[PATCH 3/4] util: Make it possible for virResctrlAllocSetMask to replace existing mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/util/virresctrl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index a1d09c547e45..89b1382b6857 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -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;
-- 
2.16.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux