Skip to content

Commit

Permalink
tool_getparam: fix potentially uninitialized err
Browse files Browse the repository at this point in the history
  • Loading branch information
jay committed Jul 9, 2017
1 parent 59a0fb2 commit 17da675
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tool_getparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 17da675

Please sign in to comment.