]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tools/cgget: fix coverity warning about resource leak
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Mon, 16 May 2022 21:57:45 +0000 (15:57 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 16 May 2022 21:57:49 +0000 (15:57 -0600)
commitfea1ab8b45d7bbe708c9fd4e66b4d639fa7aa984
tree0e7d784a788bc242fd96c486ce075e2a5ae944dc
parentb1ea1e7164c7feebddf021938b50061946e712a4
tools/cgget: fix coverity warning about resource leak

Fix two resource leaks reported by Coverity tool:

CID 1488718 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage:
Variable handle going out of scope leaks the storage it points to.

CID 1488723 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage:
Variable dir going out of scope leaks the storage it points to.

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