mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-05 01:42:33 +00:00
coverity: free dent_buf on error path (cgroup.c)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
5903da8289
commit
034ef75d49
@ -1864,8 +1864,10 @@ int cgroup_recursive_task_count(const char *cgroup_path)
|
||||
process_lock();
|
||||
d = opendir(cgroup_path);
|
||||
process_unlock();
|
||||
if (!d)
|
||||
if (!d) {
|
||||
free(dent_buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (readdir_r(d, dent_buf, &dent) == 0 && dent) {
|
||||
const char *parts[3] = {
|
||||
|
Loading…
Reference in New Issue
Block a user