mirror of https://gitee.com/openkylin/libvirt.git
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
src/util
|
@ -183,6 +183,7 @@ static int virCgroupDetectPlacement(virCgroupPtr group)
|
|||
return 0;
|
||||
|
||||
no_memory:
|
||||
fclose(mapping);
|
||||
return -ENOMEM;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue