]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cgroup.c: don't leak mem+FD upon OOM
authorJim Meyering <meyering@redhat.com>
Thu, 4 Feb 2010 10:22:20 +0000 (11:22 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 4 Feb 2010 19:00:07 +0000 (20:00 +0100)
* src/util/cgroup.c (virCgroupDetectPlacement): Close the mapping
FILE* also upon error.

src/util/cgroup.c

index e6f027059a69033e2943ac2c00bb74bfc427f009..4446c7f1ea86c6f3154b40544a507690add3b3e1 100644 (file)
@@ -183,6 +183,7 @@ static int virCgroupDetectPlacement(virCgroupPtr group)
     return 0;
 
 no_memory:
+    fclose(mapping);
     return -ENOMEM;
 
 }