summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-06-18 09:37:04 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-06-18 10:01:10 -0400
commit65aeabcbc4a88c4db8f9766b8e3a576bea274d97 (patch)
treeef3ceb687f9756eae115c6ee5330d0a3a05b3c59
parentee5d8931739ad453f9c669b252f5e3bf1e1d4c0a (diff)
downloadsssd-65aeabcbc4a88c4db8f9766b8e3a576bea274d97.tar.gz
sssd-65aeabcbc4a88c4db8f9766b8e3a576bea274d97.tar.xz
sssd-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.c11
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 f989c2249..45c5bedc4 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,