mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:33:31 +03:00
Fixed out of memory problems that caused torture test failures in tests
1021 and 1067.
This commit is contained in:
parent
fc09d10560
commit
4b01dfe369
4 changed files with 20 additions and 9 deletions
|
|
@ -2182,6 +2182,10 @@ CURLcode Curl_follow(struct SessionHandle *data,
|
|||
free(data->change.referer);
|
||||
|
||||
data->change.referer = strdup(data->change.url);
|
||||
if (!data->change.referer) {
|
||||
data->change.referer_alloc = FALSE;
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
data->change.referer_alloc = TRUE; /* yes, free this later */
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue