domain_conf: use g_renew in virDomainLeaseInsertPreAlloc()

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Matt Coleman 2020-11-05 22:32:59 -05:00 committed by Michal Privoznik
parent 53a1aa1759
commit 28a8699316

View File

@ -18274,7 +18274,8 @@ int virDomainLeaseIndex(virDomainDefPtr def,
int virDomainLeaseInsertPreAlloc(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, int virDomainLeaseInsert(virDomainDefPtr def,