aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-01-19 12:14:09 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-01-19 12:14:09 +0000
commitc2dbf2145923dd628e8335ff374c9580306531ab (patch)
tree77c6f29d1c99523040a61d45311a6298fdaf9f89 /src
parent133eb220b9a9cebc0fc86548011a4bb7650b94cb (diff)
corrected url memory handling with --globoff
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index a95dd100d..7913383e1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1579,7 +1579,9 @@ operate(struct Configurable *config, int argc, char *argv[])
/* multiple files extracted to stdout, insert separators! */
separator = 1;
}
- for (i = 0; (url = urls?next_url(urls):(i?NULL:url)); ++i) {
+ for(i = 0;
+ (url = urls?next_url(urls):(i?NULL:strdup(url)));
+ i++) {
char *outfile;
outfile = outfiles?strdup(outfiles):NULL;