[libvirt] [PATCH] util: Fix Coverity RESOURCE_LEAK

16 Jun
2015
16 Jun
'15
3:23 p.m.
Commit id 'e44b0269c9' in advertently checked !dir before calling closedir Signed-off-by: John Ferlan <jferlan@redhat.com> --- Pushed as trivial src/util/virprocess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virprocess.c b/src/util/virprocess.c index f1924eb..8fa7a9b 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -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) -- 2.1.0
3739
Age (days ago)
3739
Last active (days ago)
0 comments
1 participants
participants (1)
-
John Ferlan