From 28a86993162f7d2f15410b31bd7249fb71ce3c91 Mon Sep 17 00:00:00 2001 From: Matt Coleman Date: Thu, 5 Nov 2020 22:32:59 -0500 Subject: [PATCH] domain_conf: use g_renew in virDomainLeaseInsertPreAlloc() Signed-off-by: Matt Coleman Reviewed-by: Michal Privoznik --- src/conf/domain_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,