From b2f44b4d9a754dd205fef8d5942fd62e02523268 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 6 Apr 2016 13:08:06 +0200 Subject: [PATCH] lxc_mount_auto_mounts(): free memory on failure Signed-off-by: Christian Brauner --- src/lxc/conf.c | 1 + 1 file changed, 1 insertion(+) 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 */ -- 2.47.2