diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-07-01 07:36:46 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-26 10:29:39 -0400 |
commit | 62ada364bee87a0a910490f174e974c19b330791 (patch) | |
tree | cf240e989caa0808b2ad5d0003dedd1656b7d1bd /src | |
parent | 7b997edf7700aa7b46e2ea7fe6475f67e04e1f9c (diff) | |
download | sssd-62ada364bee87a0a910490f174e974c19b330791.tar.gz sssd-62ada364bee87a0a910490f174e974c19b330791.tar.xz sssd-62ada364bee87a0a910490f174e974c19b330791.zip |
Do not attempt to close() a file descriptor < 0
Coverity 10886
Diffstat (limited to 'src')
-rw-r--r-- | src/util/sss_ldap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/sss_ldap.c b/src/util/sss_ldap.c index 84288a903..ddaf9b686 100644 --- a/src/util/sss_ldap.c +++ b/src/util/sss_ldap.c @@ -359,7 +359,9 @@ struct tevent_req *sss_ldap_init_send(TALLOC_CTX *mem_ctx, return req; fail: - close(state->sd); + if(state->sd >= 0) { + close(state->sd); + } tevent_req_error(req, ret); #else DEBUG(3, ("ldap_init_fd not available, " |