]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
libcgroup: Rework walk_tree iterator to release all resources on error.
authorJan Safranek <jsafrane@redhat.com>
Wed, 24 Aug 2011 09:41:19 +0000 (11:41 +0200)
committerJan Safranek <jsafrane@redhat.com>
Wed, 14 Sep 2011 11:24:29 +0000 (13:24 +0200)
commitfef75d9cbc6fe5aa474670cfcf03ca69713f09ec
tree9d9bb6985053f27954187a81fc5c8d5853c88aa4
parent8db10afa9edf30caf77081e044e95a488b77789d
libcgroup: Rework walk_tree iterator to release all resources on error.

cgroup_walk_tree_begin() can end up with error and in some code paths
'*handle' is not set and in some it is.

The function should free all resources on error + return *handle = NULL

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
src/api.c