diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-08-26 11:58:18 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-08-26 11:58:18 +0000 |
commit | 752520e42834b6527bd8ae6cb43b67389d9d2b63 (patch) | |
tree | 60f89b10d0ab10d6153408ffb218b841d7c64485 /src | |
parent | 8095b776fe94ac4f5e740bd138f13420431b1456 (diff) |
don't close stdin, close the actual file handle we have!
Keith MacDonald found it.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index a7533a00f..956cb861a 100644 --- a/src/main.c +++ b/src/main.c @@ -1318,7 +1318,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ else postdata = file2string(file); if(file && (file != stdin)) - fclose(stdin); + fclose(file); } else { GetStr(&postdata, nextarg); @@ -1626,7 +1626,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ file = fopen(nextarg, "r"); config->writeout = file2string(file); if(file && (file != stdin)) - fclose(stdin); + fclose(file); } else GetStr(&config->writeout, nextarg); |