mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
http_negotiate_get(): only change *is_new on successful allocation.
This commit is contained in:
parent
2217c885b4
commit
645ee58c83
@ -57,8 +57,6 @@ http_negotiate_get(struct uri *uri, int *isnew, int alloc)
|
||||
}
|
||||
if (!alloc)
|
||||
return NULL;
|
||||
if (isnew)
|
||||
*isnew = 1;
|
||||
|
||||
neg = mem_calloc(1, sizeof(*neg));
|
||||
if (!neg)
|
||||
@ -66,6 +64,9 @@ http_negotiate_get(struct uri *uri, int *isnew, int alloc)
|
||||
|
||||
neg->uri = get_uri_reference(uri);
|
||||
|
||||
if (isnew)
|
||||
*isnew = 1;
|
||||
|
||||
return neg;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user