summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_fd_events.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_fd_events.c b/src/providers/ldap/sdap_fd_events.c
index 347cf8b8..c3f9e118 100644
--- a/src/providers/ldap/sdap_fd_events.c
+++ b/src/providers/ldap/sdap_fd_events.c
@@ -49,14 +49,16 @@ int get_fd_from_ldap(LDAP *ldap, int *fd)
int remove_ldap_connection_callbacks(struct sdap_handle *sh)
{
-#ifdef HAVE_LDAP_CONNCB
/* sdap_fd_events might be NULL here if sdap_mark_offline()
* was called before a connection was established.
*/
if (sh->sdap_fd_events) {
+#ifdef HAVE_LDAP_CONNCB
talloc_zfree(sh->sdap_fd_events->conncb);
- }
+#else
+ talloc_zfree(sh->sdap_fd_events->fde);
#endif
+ }
return EOK;
}