From: Ján Tomko Date: Wed, 23 Sep 2020 20:05:04 +0000 (+0200) Subject: secret: use g_new0 instead of VIR_ALLOC* X-Git-Tag: v6.9.0-rc1~446 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=366ca7efbe59f8e368ad32a78941c30be044a9c1;p=thirdparty%2Flibvirt.git secret: use g_new0 instead of VIR_ALLOC* Signed-off-by: Ján Tomko Reviewed-by: Daniel Henrique Barboza --- diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 1cb342878f..45da09322b 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -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) {