]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api.c: fix a memory leak in cgroup_init()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Sat, 19 Mar 2022 06:41:50 +0000 (12:11 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 21 Mar 2022 14:17:33 +0000 (08:17 -0600)
commitde4516b51eec2b430771f632abe76a31374a2b25
tree4d4d026faef5470f949e8bdcc0ffe1468279e538
parentd0ac7d75a31057896a2af45a6ac76f308eab3867
api.c: fix a memory leak in cgroup_init()

temp_ent is not free'ed in the error path if cgroup_process_v1_mnt() or
cgroup_process_v2_mnt() fails.  Move the free'ing of temp_ent to error
path.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c