Fixed out of memory problems that caused torture test failures in tests

1021 and 1067.
This commit is contained in:
Dan Fandrich 2008-08-26 21:28:57 +00:00
parent fc09d10560
commit 4b01dfe369
4 changed files with 20 additions and 9 deletions

View file

@ -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 */
}
}