1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 07:38:49 -05:00

tool_getparam: fix potentially uninitialized err

This commit is contained in:
Jay Satiro 2017-07-09 12:04:42 -04:00
parent 59a0fb2439
commit 17da675002

View File

@ -1634,7 +1634,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
if(!file)
warnf(global, "Failed to open %s!\n", &nextarg[1]);
else {
if(PARAM_OK == file2memory(&string, &len, file)) {
err = file2memory(&string, &len, file);
if(!err) {
/* Allow strtok() here since this isn't used threaded */
/* !checksrc! disable BANNEDFUNC 2 */
char *h = strtok(string, "\r\n");