]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api.c: Fix erroneous error handling in cgroup_set_values_recursive() 23/head
authorTom Hromatka <tom.hromatka@oracle.com>
Tue, 23 Feb 2021 20:47:38 +0000 (13:47 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 25 Feb 2021 15:14:09 +0000 (08:14 -0700)
commitc38fa7e9a901e43a225975baa1bf3302d18324d3
treeccf9ea6e5bdd40e5bbe6e5c7ef8a5cbd59ecd985
parent176753c215af11db0096664c8c804544f72e049f
api.c: Fix erroneous error handling in cgroup_set_values_recursive()

Ignore the positive length returned by asprintf() and only act
upon the error code returned from cg_set_control_value().  Previously
cgroup_set_values_recursive() mishandled the error handling when
the value's dirty flag was set.

Reported-by: Bharani viswas <bharani.viswas@gmail.com>
Fixes: 092e4aeb0416f ("api.c: Refactor duplicate logic in cgroup modify and create")
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c