]> xenbits.xensource.com Git - libvirt.git/commitdiff
network: Need to free formatted addr in networkDnsmasqConfContents
authorJohn Ferlan <jferlan@redhat.com>
Sat, 20 Aug 2016 13:26:26 +0000 (09:26 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 22 Aug 2016 17:14:15 +0000 (13:14 -0400)
Commit id '0b6336c2' formatted the 'addr', but didn't VIR_FREE it.

Found by Coverity.

src/network/bridge_driver.c

index 74f75d015f79c4c73caa92808315773b33b010f3..7b99acafa8ba348eee819a7e75fd850b3122ebfa 100644 (file)
@@ -969,6 +969,7 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
                 if (!addr)
                     goto cleanup;
                 virBufferAsprintf(&configbuf, "%s\n", addr);
+                VIR_FREE(addr);
             } else {
                 /* "don't forward requests for this domain" */
                 virBufferAddLit(&configbuf, "#\n");