]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Resolve Coverity FORWARD_NULL
authorJohn Ferlan <jferlan@redhat.com>
Thu, 24 Sep 2015 21:32:59 +0000 (17:32 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 7 Oct 2015 22:42:38 +0000 (18:42 -0400)
Coverity notices that net->ifname is potentially referenced after a
VIR_FREE().  Since the net->ifname will eventually be free'd during
virDomainDefFree when calling virDomainNetDefFree, let's just that
processing take care the free.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_process.c

index 8cd713f946bbe0a0739ac47687a313ccbf85dd30..8aa9efc44e21cc9662ef784488a7dd0f0b56e3e3 100644 (file)
@@ -5333,7 +5333,6 @@ void qemuProcessStop(virQEMUDriverPtr driver,
                              virDomainNetGetActualDirectMode(net),
                              virDomainNetGetActualVirtPortProfile(net),
                              cfg->stateDir));
-            VIR_FREE(net->ifname);
             break;
         case VIR_DOMAIN_NET_TYPE_BRIDGE:
         case VIR_DOMAIN_NET_TYPE_NETWORK: