From e7b3349f5adf545bf0c5907c45f2f6a890cdf41b Mon Sep 17 00:00:00 2001 From: Gao feng Date: Wed, 3 Jul 2013 12:19:50 +0100 Subject: [PATCH] LXC: fix memory leak when userns configuration is incorrect We forgot to free the stack when Kernel doesn't support user namespace. Signed-off-by: Gao feng --- src/lxc/lxc_container.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 282c726f8c..c8420db7a1 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -2131,6 +2131,7 @@ int lxcContainerStart(virDomainDefPtr def, } else { virReportSystemError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Kernel doesn't support user namespace")); + VIR_FREE(stack); return -1; } }