[PATCH 36/42] locking: Use g_autofree on virLockManagerLockDaemonPath()

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

 



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

diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index e8f0329b05..8ca77e525d 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -122,14 +122,12 @@ static char *virLockManagerLockDaemonPath(bool privileged)
     if (privileged) {
         path = g_strdup(RUNSTATEDIR "/libvirt/virtlockd-sock");
     } else {
-        char *rundir = NULL;
+        g_autofree char *rundir = NULL;
 
         if (!(rundir = virGetUserRuntimeDirectory()))
             return NULL;
 
         path = g_strdup_printf("%s/virtlockd-sock", rundir);
-
-        VIR_FREE(rundir);
     }
     return path;
 }
-- 
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