From: Daniel Stenberg Date: Thu, 14 Aug 2003 13:38:19 +0000 (+0000) Subject: better freeing when bailing out due to bad output glob X-Git-Tag: curl-7_10_7~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=caca03430283722526f950148d4379e492420bd4;p=thirdparty%2Fcurl.git better freeing when bailing out due to bad output glob --- diff --git a/src/main.c b/src/main.c index 826f6f0cec..54955916cd 100644 --- a/src/main.c +++ b/src/main.c @@ -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