]> 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:58:33 +0000 (15:58 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 16 May 2022 21:58:51 +0000 (15:58 -0600)
commit681329d5f5f8714ceb3a0e39434afebb21ff2aa6
treed98907f3ce4ab93eed58b6362ae23e5937221a18
parent00cdc03cddccdafeab855821785573a2f8080cf0
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>
(cherry picked from commit fea1ab8b45d7bbe708c9fd4e66b4d639fa7aa984)
src/api.c
src/tools/cgget.c