Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
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