mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 07:36:19 +00:00
util: Make it possible for virResctrlAllocSetMask to replace existing mask
This wil be used in the future, but it makes sense for now as well. It makes sure there is no mask leftover that would leak. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
ebafc603c1
commit
6899118043
@ -1239,6 +1239,7 @@ virResctrlAllocSetMask(virResctrlAllocPerTypePtr a_type,
|
|||||||
cache - a_type->nmasks + 1) < 0)
|
cache - a_type->nmasks + 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
virBitmapFree(a_type->masks[cache]);
|
||||||
a_type->masks[cache] = mask;
|
a_type->masks[cache] = mask;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user