1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 00:28:48 -05:00

check the correct variable to want about --stderr failures properly

CID 18 by the coverity.com scan
This commit is contained in:
Daniel Stenberg 2007-03-31 21:28:38 +00:00
parent 5796c7b132
commit 9d8b22d3de

View File

@ -1769,7 +1769,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
case 'v': /* --stderr */
if(strcmp(nextarg, "-")) {
FILE *newfile = fopen(nextarg, "wt");
if(!config->errors)
if(!newfile)
warnf(config, "Failed to open %s!\n", nextarg);
else {
config->errors = newfile;