mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
free all memory on failure before bailing out, not really necessary but
my upcoming automated test gets crazy if not
This commit is contained in:
parent
ded884e825
commit
9010bd3831
@ -2692,6 +2692,7 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!config->url_list || !config->url_list->url) {
|
if(!config->url_list || !config->url_list->url) {
|
||||||
|
clean_getout(config);
|
||||||
helpf("no URL specified!\n");
|
helpf("no URL specified!\n");
|
||||||
return CURLE_FAILED_INIT;
|
return CURLE_FAILED_INIT;
|
||||||
}
|
}
|
||||||
@ -2750,8 +2751,10 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||||||
* when all transfers are done.
|
* when all transfers are done.
|
||||||
*/
|
*/
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(!curl)
|
if(!curl) {
|
||||||
|
clean_getout(config);
|
||||||
return CURLE_FAILED_INIT;
|
return CURLE_FAILED_INIT;
|
||||||
|
}
|
||||||
|
|
||||||
/* After this point, we should call curl_easy_cleanup() if we decide to bail
|
/* After this point, we should call curl_easy_cleanup() if we decide to bail
|
||||||
* out from this function! */
|
* out from this function! */
|
||||||
|
Loading…
Reference in New Issue
Block a user