[libvirt PATCH 04/16] qemu: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

Laine Stump laine at redhat.com
Mon Aug 22 13:31:38 UTC 2022


Signed-off-by: Laine Stump <laine at redhat.com>
---
 src/qemu/qemu_process.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 5c8413a6b6..002eab43be 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4828,7 +4828,7 @@ qemuProcessGetNetworkAddress(const char *netname,
     g_autoptr(virConnect) conn = NULL;
     int ret = -1;
     g_autoptr(virNetwork) net = NULL;
-    virNetworkDef *netdef = NULL;
+    g_autoptr(virNetworkDef) netdef = NULL;
     virNetworkIPDef *ipdef;
     virSocketAddr addr;
     virSocketAddr *addrptr = NULL;
@@ -4912,7 +4912,6 @@ qemuProcessGetNetworkAddress(const char *netname,
 
     ret = 0;
  cleanup:
-    virNetworkDefFree(netdef);
     return ret;
 }
 
-- 
2.37.1



More information about the libvir-list mailing list