mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
tool_getparam: fix potentially uninitialized err
This commit is contained in:
parent
59a0fb2439
commit
17da675002
@ -1634,7 +1634,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||||||
if(!file)
|
if(!file)
|
||||||
warnf(global, "Failed to open %s!\n", &nextarg[1]);
|
warnf(global, "Failed to open %s!\n", &nextarg[1]);
|
||||||
else {
|
else {
|
||||||
if(PARAM_OK == file2memory(&string, &len, file)) {
|
err = file2memory(&string, &len, file);
|
||||||
|
if(!err) {
|
||||||
/* Allow strtok() here since this isn't used threaded */
|
/* Allow strtok() here since this isn't used threaded */
|
||||||
/* !checksrc! disable BANNEDFUNC 2 */
|
/* !checksrc! disable BANNEDFUNC 2 */
|
||||||
char *h = strtok(string, "\r\n");
|
char *h = strtok(string, "\r\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user