mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
cgroup.c: don't leak mem+FD upon OOM
* src/util/cgroup.c (virCgroupDetectPlacement): Close the mapping FILE* also upon error.
This commit is contained in:
parent
a16a96942d
commit
fd10c4e1ee
@ -183,6 +183,7 @@ static int virCgroupDetectPlacement(virCgroupPtr group)
|
||||
return 0;
|
||||
|
||||
no_memory:
|
||||
fclose(mapping);
|
||||
return -ENOMEM;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user