summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-10-24 12:56:27 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-10-24 12:56:27 +0000
commit9010bd3831adffe1c468275f6c627a0e0ce2bd72 (patch)
tree10bac884ba4df50e4311dc56b25c11f48b7331a7 /src
parentded884e8256fffcbad5ce35c088995b4dfa1b9ec (diff)
downloadcurl-9010bd3831adffe1c468275f6c627a0e0ce2bd72.tar.gz
free all memory on failure before bailing out, not really necessary but
my upcoming automated test gets crazy if not
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 06fc8dff0..86d43383d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2692,6 +2692,7 @@ operate(struct Configurable *config, int argc, char *argv[])
}
if(!config->url_list || !config->url_list->url) {
+ clean_getout(config);
helpf("no URL specified!\n");
return CURLE_FAILED_INIT;
}
@@ -2750,8 +2751,10 @@ operate(struct Configurable *config, int argc, char *argv[])
* when all transfers are done.
*/
curl = curl_easy_init();
- if(!curl)
+ if(!curl) {
+ clean_getout(config);
return CURLE_FAILED_INIT;
+ }
/* After this point, we should call curl_easy_cleanup() if we decide to bail
* out from this function! */