Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
src/logging/log_daemon_config.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/logging/log_daemon_config.c b/src/logging/log_daemon_config.c
index 0cf9729e7f..ab42921140 100644
--- a/src/logging/log_daemon_config.c
+++ b/src/logging/log_daemon_config.c
@@ -42,13 +42,12 @@ virLogDaemonConfigFilePath(bool privileged, char **configfile)
if (privileged) {
*configfile = g_strdup(SYSCONFDIR "/libvirt/virtlogd.conf");
} else {
- char *configdir = NULL;
+ g_autofree char *configdir = NULL;
if (!(configdir = virGetUserConfigDirectory()))
goto error;
*configfile = g_strdup_printf("%s/virtlogd.conf", configdir);
- VIR_FREE(configdir);
}
return 0;
--
2.24.1