mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
util: Fix Coverity RESOURCE_LEAK
Commit id 'e44b0269c9' in advertently checked !dir before calling closedir
This commit is contained in:
parent
4ec52c364b
commit
ad5fd9b87b
@ -638,7 +638,7 @@ int virProcessGetPids(pid_t pid, size_t *npids, pid_t **pids)
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
if (!dir)
|
||||
if (dir)
|
||||
closedir(dir);
|
||||
VIR_FREE(taskPath);
|
||||
if (ret < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user