diff options
author | Michal Zidek <mzidek@redhat.com> | 2013-04-03 17:04:41 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-05 17:22:29 +0200 |
commit | e391eb27c711a5d51f7a5ad92928212fdcb3133a (patch) | |
tree | fcd26f591b4e83f269971abe2f6a0310696c646d /src/tools/sss_userdel.c | |
parent | 4d09e8abf9f4306d3d6add88ee9100373c421c74 (diff) | |
download | sssd-e391eb27c711a5d51f7a5ad92928212fdcb3133a.tar.gz sssd-e391eb27c711a5d51f7a5ad92928212fdcb3133a.tar.bz2 sssd-e391eb27c711a5d51f7a5ad92928212fdcb3133a.zip |
Check for waitpid failure at wrong place.
Coverity bugs.
https://fedorahosted.org/sssd/ticket/1865
Diffstat (limited to 'src/tools/sss_userdel.c')
-rw-r--r-- | src/tools/sss_userdel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/sss_userdel.c b/src/tools/sss_userdel.c index 2cf77596..ac87a736 100644 --- a/src/tools/sss_userdel.c +++ b/src/tools/sss_userdel.c @@ -101,15 +101,15 @@ static int kick_user(struct tools_ctx *tctx) } while((child_pid = waitpid(pid, &status, 0)) > 0) { - if (child_pid == -1) { - DEBUG(1, ("waitpid failed\n")); - return errno; - } if (WIFEXITED(status)) { break; } } + if (child_pid == -1) { + DEBUG(SSSDBG_CRIT_FAILURE, ("waitpid failed\n")); + return errno; + } } return EOK; |