mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 03:21:19 +00:00
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,
|
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||||
void *opaque G_GNUC_UNUSED)
|
void *opaque G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
if (VIR_ALLOC(driver) < 0)
|
driver = g_new0(virSecretDriverState, 1);
|
||||||
return VIR_DRV_STATE_INIT_ERROR;
|
|
||||||
|
|
||||||
driver->lockFD = -1;
|
driver->lockFD = -1;
|
||||||
if (virMutexInit(&driver->lock) < 0) {
|
if (virMutexInit(&driver->lock) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user