2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 08:09:38 +00:00

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

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn
2013-04-14 22:02:03 -05:00
parent 022de5f317
commit bb1d227404

View File

@@ -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;
}