]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Don't leak memory if a cgroup is mounted multiple times
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 31 Aug 2011 15:46:13 +0000 (16:46 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 31 Aug 2011 16:51:09 +0000 (17:51 +0100)
commitc32536e7da5a838a2a527f69003cabda7af7b94c
tree3a8866a4d7658042df84494e3849be844164f367
parentcab55fa0a8bade37033f9f4914d48096e3bd32a4
Don't leak memory if a cgroup is mounted multiple times

It is possible (expected/likely in Fedora 15) for a cgroup controller
to be mounted in multiple locations at the same time, due to bind
mounts. Currently we leak memory if this happens, because we overwrite
the previous 'mountPoint' string. Instead just accept the first match
we find.

* src/util/cgroup.c: Only accept first match for a cgroup
  controller mount
src/util/cgroup.c