diff --git a/src/logging/log_daemon_config.c b/src/logging/log_daemon_config.c index 0cf9729e7f82e23e7d0d4912b8162ade6408d228..ab42921140a0ee9e7f04fc93daf01541a2e0069b 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;