tool_getparam: fix memory leak on test 1147 OOM (torture tests)
Bug: https://github.com/curl/curl/pull/1486#issuecomment-310926872 Reported-by: Dan Fandrich
This commit is contained in:
parent
bec809cb2e
commit
922f800603
@ -1626,13 +1626,15 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
||||
else
|
||||
err = add2list(&config->headers, h);
|
||||
if(err)
|
||||
return err;
|
||||
break;
|
||||
h = strtok(NULL, "\r\n");
|
||||
}
|
||||
free(string);
|
||||
}
|
||||
if(!use_stdin)
|
||||
fclose(file);
|
||||
if(err)
|
||||
return err;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user