]> granicus.if.org Git - curl/commitdiff
corrected url memory handling with --globoff
authorDaniel Stenberg <daniel@haxx.se>
Fri, 19 Jan 2001 12:14:09 +0000 (12:14 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 19 Jan 2001 12:14:09 +0000 (12:14 +0000)
src/main.c

index a95dd100da452cc9453bc88002d59878b952175c..7913383e105f0b21b68fd3e68f9fc1541bb63567 100644 (file)
@@ -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;