On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/util/virresctrl.c | 53 ++++++++++++++-----------------------------
1 file changed, 17 insertions(+), 36 deletions(-)
@@ -1945,7 +1937,7 @@ virResctrlAllocFindUnused(virResctrlAllocPtr alloc,
{
unsigned long long *size = alloc->levels[level]->types[type]->sizes[cache];
virBitmapPtr a_mask = NULL;
- virBitmapPtr f_mask = NULL;
+ g_autoptr(virBitmap) f_mask = NULL;
a_mask should be the one marked with g_auto
unsigned long long need_bits;
size_t i = 0;
ssize_t pos = -1;
@@ -2049,7 +2041,6 @@ virResctrlAllocFindUnused(virResctrlAllocPtr alloc,
ret = 0;
cleanup:
- virBitmapFree(a_mask);
return ret;
}
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano