summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-12-12 09:30:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-12-12 09:30:52 +0000
commitec420c62d92a32e8fec08259e0cbca23f81c8254 (patch)
tree9bb3a4eebc4a1c0bd614f00cfa49ee42ed09f0b7
parent5d44f00201d461ebabf3982a35c7adb8474429f7 (diff)
downloadgnurl-ec420c62d92a32e8fec08259e0cbca23f81c8254.tar.gz
gnurl-ec420c62d92a32e8fec08259e0cbca23f81c8254.tar.bz2
gnurl-ec420c62d92a32e8fec08259e0cbca23f81c8254.zip
fixed a strdup(NULL) error
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index e1234f7fd..d42fe11b9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1475,7 +1475,7 @@ operate(struct Configurable *config, int argc, char *argv[])
for (i = 0; (url = next_url(urls)); ++i) {
if (config->outfile) {
free(config->outfile);
- config->outfile = strdup(outfiles);
+ config->outfile = outfiles?strdup(outfiles):NULL;
}
if (config->outfile || config->remotefile) {