mirror of https://gitee.com/openkylin/libvirt.git
Adapt to VIR_STRDUP and VIR_STRNDUP in src/secret/*
This commit is contained in:
parent
a39875b7f8
commit
296d319f05
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue