diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-06-18 09:37:04 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-06-18 10:01:10 -0400 |
commit | 65aeabcbc4a88c4db8f9766b8e3a576bea274d97 (patch) | |
tree | ef3ceb687f9756eae115c6ee5330d0a3a05b3c59 | |
parent | ee5d8931739ad453f9c669b252f5e3bf1e1d4c0a (diff) | |
download | sssd2-65aeabcbc4a88c4db8f9766b8e3a576bea274d97.tar.gz sssd2-65aeabcbc4a88c4db8f9766b8e3a576bea274d97.tar.xz sssd2-65aeabcbc4a88c4db8f9766b8e3a576bea274d97.zip |
Fix return value from remove_connection_callback() destructor
ldap_get_option() can only fail if the option we're removing has
already been removed. It is sufficient to log this and continue.
-rw-r--r-- | src/providers/ldap/sdap_fd_events.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/providers/ldap/sdap_fd_events.c b/src/providers/ldap/sdap_fd_events.c index f989c224..45c5bedc 100644 --- a/src/providers/ldap/sdap_fd_events.c +++ b/src/providers/ldap/sdap_fd_events.c @@ -50,14 +50,7 @@ int get_fd_from_ldap(LDAP *ldap, int *fd) int remove_ldap_connection_callbacks(struct sdap_handle *sh) { #ifdef HAVE_LDAP_CONNCB - int ret; - - ret = talloc_free(sh->sdap_fd_events->conncb); - if (ret != 0) { - return EIO; - } - - sh->sdap_fd_events->conncb = NULL; + talloc_zfree(sh->sdap_fd_events->conncb); #endif return EOK; } @@ -78,7 +71,7 @@ static int remove_connection_callback(TALLOC_CTX *mem_ctx) } else { DEBUG(9, ("Successfully removed connection callback.\n")); } - return lret; + return EOK; } static int sdap_ldap_connect_callback_add(LDAP *ld, Sockbuf *sb, |