Adapt to VIR_STRDUP and VIR_STRNDUP in src/secret/*

This commit is contained in:
Michal Privoznik 2013-05-03 14:48:16 +02:00
parent a39875b7f8
commit 296d319f05
1 changed files with 2 additions and 3 deletions

View File

@ -1097,9 +1097,8 @@ secretStateInitialize(bool privileged,
secretDriverLock(driverState);
if (privileged) {
base = strdup(SYSCONFDIR "/libvirt");
if (base == NULL)
goto out_of_memory;
if (VIR_STRDUP(base, SYSCONFDIR "/libvirt") < 0)
goto error;
} else {
base = virGetUserConfigDirectory();
if (!base)