From 65aeabcbc4a88c4db8f9766b8e3a576bea274d97 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 18 Jun 2010 09:37:04 -0400 Subject: 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. --- src/providers/ldap/sdap_fd_events.c | 11 ++--------- 1 file 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, -- cgit