From 649ecb704f5366221fe2686ff556418d8e520748 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 1 May 2013 10:53:33 -0400 Subject: [PATCH] lxc: Coverity false positive USE_AFTER_FREE --- src/lxc/lxc_container.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index ff4069a320..586fe9af4e 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -1772,6 +1772,11 @@ static int lxcContainerSetupPivotRoot(virDomainDefPtr vmDef, /* Some versions of Linux kernel don't let you overmount * the selinux filesystem, so make sure we kill it first */ + /* Filed coverity bug for false positive 'USE_AFTER_FREE' due to swap + * of root->src with root->dst and the VIR_FREE(root->src) prior to the + * reset of root->src in lxcContainerPrepareRoot() + */ + /* coverity[deref_arg] */ if (STREQ(root->src, "/") && lxcContainerUnmountSubtree(SELINUX_MOUNT, false) < 0) goto cleanup;