aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-08-14 13:38:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-08-14 13:38:19 +0000
commitcaca03430283722526f950148d4379e492420bd4 (patch)
tree1ab7501bc3fd7e5a22b9ffbf0c94fb5cbe0d0b1f /src/main.c
parentfb366ed35f138d0e9df6b4cd8e64f4ed3684f759 (diff)
better freeing when bailing out due to bad output glob
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 826f6f0ce..54955916c 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