]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api: fix missing goto in cgroup_get_current_controller_path()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 4 Jul 2023 06:34:51 +0000 (12:04 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 5 Jul 2023 15:06:01 +0000 (09:06 -0600)
commiteec006f5667f586c3cecffdb16c84e08a059d44a
tree2c42f5f5409c13e446102e34db3f8f3a396c9fd2
parent3124474303cbed17455b0d5300feb34b1317b045
api: fix missing goto in cgroup_get_current_controller_path()

Fix missing goto on error in cgroup_get_current_controller_path(), it
was reported by Coverity tool as unused value:

CID 320875 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value:
Assigning value ECGOTHER to ret here, but that stored value is
overwritten before it can be used.

It turns out that, it is more than an over-written value, the strdup()
was missing goto error path statement on failure, add it.

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