[PATCH 41/42] admin: Use g_autofree on getSocketPath()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 src/admin/libvirt-admin.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/admin/libvirt-admin.c b/src/admin/libvirt-admin.c
index f156736d9f..d0c191a56a 100644
--- a/src/admin/libvirt-admin.c
+++ b/src/admin/libvirt-admin.c
@@ -99,7 +99,7 @@ virAdmInitialize(void)
 static char *
 getSocketPath(virURIPtr uri)
 {
-    char *rundir = virGetUserRuntimeDirectory();
+    g_autofree char *rundir = virGetUserRuntimeDirectory();
     char *sock_path = NULL;
     size_t i = 0;
 
@@ -160,7 +160,6 @@ getSocketPath(virURIPtr uri)
     }
 
  cleanup:
-    VIR_FREE(rundir);
     return sock_path;
 
  error:
-- 
2.24.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux