From: Serge Hallyn Date: Mon, 15 Apr 2013 02:56:51 +0000 (-0500) Subject: fix resource leak of utsname in error path found by coverity X-Git-Tag: lxc-1.0.0.alpha1~1^2~305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6f24d54f54146a0f5de700dac7ffc2ef7624359;p=thirdparty%2Flxc.git fix resource leak of utsname in error path found by coverity Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 676878e62..38685fb0d 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -1344,6 +1344,7 @@ static int config_utsname(const char *key, const char *value, if (strlen(value) >= sizeof(utsname->nodename)) { ERROR("node name '%s' is too long", utsname->nodename); + free(utsname); return -1; }