aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-12-04 12:21:18 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-12-04 12:21:18 +0000
commitca8196a4dccb339660a9431a339eb74c2d95569e (patch)
tree5e1a8f83ae2c92bfdce5b5d0b9d2cb6a6ff23804
parent52707f959058c148c8a5ef4e81d0599780a1c014 (diff)
Jörn fixed a multiple URL output bug
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 03a5444a7..ba5bcf925 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1473,9 +1473,9 @@ operate(struct Configurable *config, int argc, char *argv[])
#endif
}
for (i = 0; (url = next_url(urls)); ++i) {
- if (outfiles) {
+ if (config->outfile) {
free(config->outfile);
- config->outfile = outfiles;
+ config->outfile = strdup(outfiles);
}
if (config->outfile || config->remotefile) {
@@ -1757,6 +1757,9 @@ operate(struct Configurable *config, int argc, char *argv[])
free(url);
}
+ if(outfiles)
+ free(outfiles);
+
#ifdef MIME_SEPARATORS
if (separator)
printf("--%s--\n", MIMEseparator);