This leaks the FD of BPF map which means it will not be freed. Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/util/vircgroupv2devices.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util/vircgroupv2devices.c b/src/util/vircgroupv2devices.c index 402ce3f86f..445f9c53fc 100644 --- a/src/util/vircgroupv2devices.c +++ b/src/util/vircgroupv2devices.c @@ -311,6 +311,11 @@ virCgroupV2DevicesAttachProg(virCgroupPtr group, VIR_FORCE_CLOSE(group->unified.devices.progfd); } + if (group->unified.devices.mapfd > 0) { + VIR_DEBUG("Closing existing map that was replaced by new one."); + VIR_FORCE_CLOSE(group->unified.devices.mapfd); + } + group->unified.devices.progfd = progfd; group->unified.devices.mapfd = mapfd; group->unified.devices.max = max; -- 2.24.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list