The commit
66799b867c7 (tools/cgxget: fix the resource leak in
convert_cgroup()), is a partial fix. It de-allocated the array members
of the dynamically allocated cg_converted_list[], but fails to free()
the cg_converted_list. Fix the resource leak by de-allocating it.
Fixes: 66799b867c7 (tools/cgxget: fix the resource leak in convert_group)
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
/* The conversion failed */
for (j = 0; j < i; j++)
cgroup_free(&(cg_converted_list[j]));
+ free(cg_converted_list);
} else {
/*
* The conversion succeeded or was unmappable.