From: Christian Brauner Date: Wed, 6 Apr 2016 11:08:06 +0000 (+0200) Subject: lxc_mount_auto_mounts(): free memory on failure X-Git-Tag: lxc-2.0.0~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F950%2Fhead;p=thirdparty%2Flxc.git lxc_mount_auto_mounts(): free memory on failure Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index ff2bcf33e..3b023efea 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -719,6 +719,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha } if (!default_mounts[i].destination) { ERROR("BUG: auto mounts destination %d was NULL", i); + free(source); return -1; } /* will act like strdup if %r is not present */