mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +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;
|
return 0;
|
||||||
|
|
||||||
no_memory:
|
no_memory:
|
||||||
|
fclose(mapping);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user