From: Serge Hallyn Date: Mon, 15 Apr 2013 02:59:02 +0000 (-0500) Subject: fix resource leak of netdev on error path found by coverity X-Git-Tag: lxc-1.0.0.alpha1~1^2~304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=022de5f317014c538e17378b626cf3267625e141;p=thirdparty%2Flxc.git fix resource leak of netdev on error path found by coverity Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 38685fb0d..29d3b23fa 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -272,6 +272,7 @@ static int config_network_type(const char *key, const char *value, list = malloc(sizeof(*list)); if (!list) { SYSERROR("failed to allocate memory"); + free(netdev); return -1; }