in a special situation (entry->fts == NULL)
cgroup_walk_tree_begin does not free the entry structure.
This patch fix it.

Signed-off-by: Ivana Hutarova Varekova <varek...@redhat.com>
---

 src/api.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/api.c b/src/api.c
index c91be82..597772b 100644
--- a/src/api.c
+++ b/src/api.c
@@ -3025,6 +3025,7 @@ int cgroup_walk_tree_begin(const char *controller, const 
char *base_path,
        entry->fts = fts_open(cg_path, FTS_LOGICAL | FTS_NOCHDIR |
                                FTS_NOSTAT, NULL);
        if (entry->fts == NULL) {
+               free(entry);
                last_errno = errno;
                return ECGOTHER;
        }


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to