Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/secret/secret_driver.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 064a02dfdd..5a5c84412a 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -469,19 +469,19 @@ secretStateInitialize(bool privileged,
driver->privileged = privileged;
if (privileged) {
- virAsprintf(&driver->configDir, "%s/libvirt/secrets",
SYSCONFDIR);
- virAsprintf(&driver->stateDir, "%s/libvirt/secrets",
RUNSTATEDIR);
+ driver->configDir = g_strdup_printf("%s/libvirt/secrets",
SYSCONFDIR);
+ driver->stateDir = g_strdup_printf("%s/libvirt/secrets",
RUNSTATEDIR);
} else {
g_autofree char *rundir = NULL;
g_autofree char *cfgdir = NULL;
if (!(cfgdir = virGetUserConfigDirectory()))
goto error;
- virAsprintf(&driver->configDir, "%s/secrets/", cfgdir);
+ driver->configDir = g_strdup_printf("%s/secrets/", cfgdir);
if (!(rundir = virGetUserRuntimeDirectory()))
goto error;
- virAsprintf(&driver->stateDir, "%s/secrets/run", rundir);
+ driver->stateDir = g_strdup_printf("%s/secrets/run", rundir);
}
if (virFileMakePathWithMode(driver->configDir, S_IRWXU) < 0) {
--
2.21.0