1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-01 20:05: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:
Martin Kletzander 2018-01-26 14:47:19 +01:00
parent ebafc603c1
commit 6899118043

@ -1239,6 +1239,7 @@ virResctrlAllocSetMask(virResctrlAllocPerTypePtr a_type,
cache - a_type->nmasks + 1) < 0)
return -1;
virBitmapFree(a_type->masks[cache]);
a_type->masks[cache] = mask;
return 0;