]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
better freeing when bailing out due to bad output glob
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Aug 2003 13:38:19 +0000 (13:38 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Aug 2003 13:38:19 +0000 (13:38 +0000)
src/main.c

index 826f6f0cece97fb5faaaa4fff38c78a7c64455b9..54955916cdd12e9cf52b93df4310540f5d838a4a 100644 (file)
@@ -2672,7 +2672,7 @@ operate(struct Configurable *config, int argc, char *argv[])
   }
 
   /* loop through the list of given URLs */
-  while(urlnode) {
+  while(urlnode && !res) {
 
     /* get the full URL (it might be NULL) */
     url=urlnode->url;
@@ -2765,10 +2765,11 @@ operate(struct Configurable *config, int argc, char *argv[])
           free(storefile);
           if(!outfile) {
             /* bad globbing */
-            helpf("bad output glob!\n");
-            return CURLE_FAILED_INIT;
+            fprintf(stderr, "bad output glob!\n");
+            free(url);
+            res = CURLE_FAILED_INIT;
+            break;
           }
-
         }
       
         /* Create the directory hierarchy, if not pre-existant to a multiple