mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
Fixed an OOM handling problem that cause test 11 to fail the torture test.
This commit is contained in:
parent
aee7fc118b
commit
d4b253ba3e
3
CHANGES
3
CHANGES
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel Fandrich (9 Jul 2008)
|
||||||
|
- Fixed an OOM handling problem that cause test 11 to fail the torture test.
|
||||||
|
|
||||||
Daniel Fandrich (8 Jul 2008)
|
Daniel Fandrich (8 Jul 2008)
|
||||||
- Fixed test 554 to pass the torture test.
|
- Fixed test 554 to pass the torture test.
|
||||||
|
|
||||||
|
@ -2398,17 +2398,21 @@ CURLcode Curl_perform(struct SessionHandle *data)
|
|||||||
if(data->req.newurl) {
|
if(data->req.newurl) {
|
||||||
follow = FOLLOW_REDIR;
|
follow = FOLLOW_REDIR;
|
||||||
newurl = strdup(data->req.newurl);
|
newurl = strdup(data->req.newurl);
|
||||||
|
if (!newurl)
|
||||||
|
res = CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
else if(data->req.location) {
|
else if(data->req.location) {
|
||||||
follow = FOLLOW_FAKE;
|
follow = FOLLOW_FAKE;
|
||||||
newurl = strdup(data->req.location);
|
newurl = strdup(data->req.location);
|
||||||
|
if (!newurl)
|
||||||
|
res = CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* in the above cases where 'newurl' gets assigned, we have a fresh
|
/* in the above cases where 'newurl' gets assigned, we have a fresh
|
||||||
* allocated memory pointed to */
|
* allocated memory pointed to */
|
||||||
}
|
}
|
||||||
else {
|
if(res != CURLE_OK) {
|
||||||
/* The transfer phase returned error, we mark the connection to get
|
/* The transfer phase returned error, we mark the connection to get
|
||||||
* closed to prevent being re-used. This is becasue we can't
|
* closed to prevent being re-used. This is becasue we can't
|
||||||
* possibly know if the connection is in a good shape or not now. */
|
* possibly know if the connection is in a good shape or not now. */
|
||||||
|
Loading…
Reference in New Issue
Block a user