From ca8196a4dccb339660a9431a339eb74c2d95569e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Dec 2000 12:21:18 +0000 Subject: [PATCH] =?UTF-8?q?J=F6rn=20fixed=20a=20multiple=20URL=20output=20?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 03a5444a78..ba5bcf9255 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);