[PATCH 22/42] locking: Use g_autofree on virLockDaemonConfigFilePath()

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

 



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

diff --git a/src/locking/lock_daemon_config.c b/src/locking/lock_daemon_config.c
index d7e13013d7..62df30d9f4 100644
--- a/src/locking/lock_daemon_config.c
+++ b/src/locking/lock_daemon_config.c
@@ -41,13 +41,12 @@ virLockDaemonConfigFilePath(bool privileged, char **configfile)
     if (privileged) {
         *configfile = g_strdup(SYSCONFDIR "/libvirt/virtlockd.conf");
     } else {
-        char *configdir = NULL;
+        g_autofree char *configdir = NULL;
 
         if (!(configdir = virGetUserConfigDirectory()))
             goto error;
 
         *configfile = g_strdup_printf("%s/virtlockd.conf", configdir);
-        VIR_FREE(configdir);
     }
 
     return 0;
-- 
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