mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-29 20:11:16 +00:00
logging: Use g_autofree in virLogDaemonConfigFilePath()
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
70c2052011
commit
ce33c21f23
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user