]> granicus.if.org Git - curl/commitdiff
tool_getparam: fix potentially uninitialized err
authorJay Satiro <raysatiro@yahoo.com>
Sun, 9 Jul 2017 16:04:42 +0000 (12:04 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 9 Jul 2017 16:04:42 +0000 (12:04 -0400)
src/tool_getparam.c

index 64a84af99f19e68a09cf0edab2b68655cb13535e..cc2d816f150c2cafa2fd13da536041655b876b3d 100644 (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");