[libvirt] [PATCH 09/19] network_conf: Resolve Coverity RESOURCE_LEAK

John Ferlan jferlan at redhat.com
Wed Aug 27 20:54:40 UTC 2014


Need to VIR_FREE the startip/endip we allocated for the error message

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/conf/network_conf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index dc25c6e..9571ee1 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -3627,6 +3627,8 @@ virNetworkDefUpdateIPDHCPRange(virNetworkDefPtr def,
                            def->name,
                            startip ? startip : "unknown",
                            endip ? endip : "unknown");
+            VIR_FREE(startip);
+            VIR_FREE(endip);
             goto cleanup;
         }
 
-- 
1.9.3




More information about the libvir-list mailing list