]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
bridge_driver: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 19:15:05 +0000 (15:15 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 28 Aug 2014 12:12:16 +0000 (08:12 -0400)
In the error path the 'ipaddr' wasn't VIR_FREE'd before jumping to cleanup

src/network/bridge_driver.c

index 9491c5173b240ba2d1d4f58cd07f074955df18f0..4b3f07f477582a80c6cf4eddc315bdb499605cfa 100644 (file)
@@ -993,6 +993,7 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
                                  "(as described in RFC1918/RFC3484/RFC4193)."),
                                ipaddr, (int)version / 1000000,
                                (int)(version % 1000000) / 1000);
+                VIR_FREE(ipaddr);
                 goto cleanup;
             }
             virBufferAsprintf(&configbuf, "listen-address=%s\n", ipaddr);