mirror of https://gitee.com/openkylin/libvirt.git
secret: use g_new0 instead of VIR_ALLOC*
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
8e6340631a
commit
366ca7efbe
|
@ -459,8 +459,7 @@ secretStateInitialize(bool privileged,
|
|||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (VIR_ALLOC(driver) < 0)
|
||||
return VIR_DRV_STATE_INIT_ERROR;
|
||||
driver = g_new0(virSecretDriverState, 1);
|
||||
|
||||
driver->lockFD = -1;
|
||||
if (virMutexInit(&driver->lock) < 0) {
|
||||
|
|
Loading…
Reference in New Issue