mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
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:
parent
53a1aa1759
commit
28a8699316
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user