]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: Coverity false positive USE_AFTER_FREE
authorJohn Ferlan <jferlan@redhat.com>
Wed, 1 May 2013 14:53:33 +0000 (10:53 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 8 May 2013 10:16:53 +0000 (06:16 -0400)
src/lxc/lxc_container.c

index ff4069a320fa86ca2144a0345921c81219b41ef9..586fe9af4e6d000f574312643f6b321794fead5e 100644 (file)
@@ -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;