mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
util: Fix possible leak in virResctrlAllocMasksAssign
Found by coverity. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
1b9fe756ec
commit
679543449c
@ -1444,10 +1444,10 @@ virResctrlAllocMasksAssign(virResctrlInfoPtr resctrl,
|
||||
|
||||
alloc_default = virResctrlAllocGetDefault(resctrl);
|
||||
if (!alloc_default)
|
||||
return -1;
|
||||
goto cleanup;
|
||||
|
||||
if (virResctrlAllocCopyMasks(alloc, alloc_default) < 0)
|
||||
return -1;
|
||||
goto cleanup;
|
||||
|
||||
for (level = 0; level < alloc->nlevels; level++) {
|
||||
virResctrlAllocPerLevelPtr a_level = alloc->levels[level];
|
||||
|
Loading…
Reference in New Issue
Block a user