]> granicus.if.org Git - curl/commitdiff
free all memory on failure before bailing out, not really necessary but
authorDaniel Stenberg <daniel@haxx.se>
Fri, 24 Oct 2003 12:56:27 +0000 (12:56 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 24 Oct 2003 12:56:27 +0000 (12:56 +0000)
my upcoming automated test gets crazy if not

src/main.c

index 06fc8dff0d29d50a36231cf1156cc1c14bd56dfd..86d43383d19ad37af7f7eaffd476f74163a814d6 100644 (file)
@@ -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! */