Commit bb1d2274 by Serge Hallyn

fix free of alloca()d buffer (found by coverity)

parent 022de5f3
......@@ -358,7 +358,6 @@ static int run_script(const char *name, const char *section,
ret = snprintf(buffer, size, "%s %s %s", script, name, section);
if (ret < 0 || ret >= size) {
ERROR("Script name too long");
free(buffer);
return -1;
}
......@@ -368,7 +367,6 @@ static int run_script(const char *name, const char *section,
int rc;
rc = snprintf(buffer + ret, len, " %s", p);
if (rc < 0 || rc >= len) {
free(buffer);
ERROR("Script args too long");
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment