From: Serge Hallyn Date: Mon, 15 Apr 2013 03:02:03 +0000 (-0500) Subject: fix free of alloca()d buffer (found by coverity) X-Git-Tag: lxc-1.0.0.alpha1~1^2~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb1d227404ff96564877a04ef9299c63f608f543;p=thirdparty%2Flxc.git fix free of alloca()d buffer (found by coverity) Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 6b3f31813..33061df22 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -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; }