]> xenbits.xensource.com Git - libvirt.git/commitdiff
domain_conf: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Fri, 9 Jan 2015 16:02:04 +0000 (11:02 -0500)
committerCédric Bosdonnat <cbosdonnat@suse.com>
Fri, 16 Jan 2015 09:14:03 +0000 (10:14 +0100)
Commit id 'aa2cc721' added call to virSocketAddrFormat
and did not VIR_FREE() the returned memory.

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

index 783d7a9f0af601d9d6759a3480f5fd22c767bc3f..3a6144bb9f2768bbc40042957346c38d1a425604 100644 (file)
@@ -17212,6 +17212,7 @@ virDomainNetIpsFormat(virBufferPtr buf, virDomainNetIpDefPtr *ips, size_t nips)
             familyStr = "ipv4";
         virBufferAsprintf(buf, "<ip address='%s'",
                           ipStr);
+        VIR_FREE(ipStr);
         if (familyStr)
             virBufferAsprintf(buf, " family='%s'", familyStr);
         if (ips[i]->prefix != 0)