From: Matt Coleman Date: Fri, 6 Nov 2020 03:32:59 +0000 (-0500) Subject: domain_conf: use g_renew in virDomainLeaseInsertPreAlloc() X-Git-Tag: v6.10.0-rc1~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28a86993162f7d2f;p=thirdparty%2Flibvirt.git domain_conf: use g_renew in virDomainLeaseInsertPreAlloc() Signed-off-by: Matt Coleman Reviewed-by: Michal Privoznik --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 635e3e9ab2..7603f08184 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18274,7 +18274,8 @@ int virDomainLeaseIndex(virDomainDefPtr def, int virDomainLeaseInsertPreAlloc(virDomainDefPtr def) { - return VIR_EXPAND_N(def->leases, def->nleases, 1); + def->leases = g_renew(virDomainLeaseDefPtr, def->leases, def->nleases + 1); + return 0; } int virDomainLeaseInsert(virDomainDefPtr def,