]> git.ipfire.org Git - thirdparty/lxc.git/commit
fix leak in list_active_containers()
authorDwight Engen <dwight.engen@oracle.com>
Tue, 5 Nov 2013 18:17:02 +0000 (13:17 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 6 Nov 2013 14:11:21 +0000 (08:11 -0600)
commit148a9d276cd256746515068ba0fef7b45a917dfe
treea4585e09f46839bb2376870b18f0474867659949
parent2c319dbfb562e32ce0ee37a45906ea6370e555b7
fix leak in list_active_containers()

Found by running the lxc-test-list test with valgrind. The names were
put into a local array, and never freed in the success case where the
caller didn't want the names returned and in the early out failure case.

Note we don't need to check the return from remove_from_array() because
we just successfully added the name above.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c