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 <gaofeng@cn.fujitsu.com>
This commit is contained in:
Gao feng 2013-07-03 12:19:50 +01:00 committed by Daniel P. Berrange
parent 5995fcf04a
commit e7b3349f5a

View File

@ -2131,6 +2131,7 @@ int lxcContainerStart(virDomainDefPtr def,
} else { } else {
virReportSystemError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportSystemError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Kernel doesn't support user namespace")); _("Kernel doesn't support user namespace"));
VIR_FREE(stack);
return -1; return -1;
} }
} }