1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

bail out nicely if strdup() returns NULL, removed trailing whitespace

This commit is contained in:
Daniel Stenberg 2004-05-17 06:53:41 +00:00
parent 6bd8db3c99
commit de279099e5

View File

@ -334,6 +334,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
easy->result = Curl_done(easy->easy_conn, CURLE_OK);
if(CURLE_OK == easy->result) {
gotourl = strdup(easy->easy_handle->change.url);
if(gotourl) {
easy->easy_handle->change.url_changed = FALSE;
easy->result = Curl_follow(easy->easy_handle, gotourl);
if(CURLE_OK == easy->result)
@ -341,6 +342,9 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
else
free(gotourl);
}
else
easy->result = CURLE_OUT_OF_MEMORY;
}
}
easy->easy_handle->change.url_changed = FALSE;