1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00

http_negotiate_get(): only change *is_new on successful allocation.

This commit is contained in:
Laurent MONIN 2006-06-16 16:27:28 +02:00 committed by Laurent MONIN
parent 2217c885b4
commit 645ee58c83

View File

@ -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;
}