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:
Jim Meyering 2010-02-04 11:22:20 +01:00
parent a16a96942d
commit fd10c4e1ee

View File

@ -183,6 +183,7 @@ static int virCgroupDetectPlacement(virCgroupPtr group)
return 0;
no_memory:
fclose(mapping);
return -ENOMEM;
}