core: fix free undefined pointer when strdup failed in the first loop
This commit is contained in:
@@ -800,7 +800,7 @@ int config_parse_exec(
|
||||
if (!separate_argv0) {
|
||||
char *w = NULL;
|
||||
|
||||
if (!GREEDY_REALLOC(n, nlen + 2))
|
||||
if (!GREEDY_REALLOC0(n, nlen + 2))
|
||||
return log_oom();
|
||||
|
||||
w = strdup(path);
|
||||
@@ -832,7 +832,7 @@ int config_parse_exec(
|
||||
p += 2;
|
||||
p += strspn(p, WHITESPACE);
|
||||
|
||||
if (!GREEDY_REALLOC(n, nlen + 2))
|
||||
if (!GREEDY_REALLOC0(n, nlen + 2))
|
||||
return log_oom();
|
||||
|
||||
w = strdup(";");
|
||||
|
||||
Reference in New Issue
Block a user