Signed-off-by: Matt Coleman <matt(a)datto.com>
---
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 4eace66ce7..987992efa6 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,
--
2.27.0