mirror of
https://github.com/curl/curl.git
synced 2025-03-31 16:00:35 +08:00
don't close stdin, close the actual file handle we have!
Keith MacDonald found it.
This commit is contained in:
parent
8095b776fe
commit
752520e428
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user