From dba5773d9d0b2a92938b8f3c434a4d6ef17cc236 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 7 Oct 2004 14:46:58 +0000 Subject: r2851: don't destroy the gensec context it's used for sign and seal check the result of ldap_receive() metze (This used to be commit 778cf6d92bc3c50add43b573652c2aefef65026c) --- source4/libcli/ldap/ldap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c index c78e49bdfe..bea78a8928 100644 --- a/source4/libcli/ldap/ldap.c +++ b/source4/libcli/ldap/ldap.c @@ -1557,8 +1557,6 @@ int ldap_bind_sasl(struct ldap_connection *conn, const char *username, const cha } done: - if (conn->gensec) - gensec_end(&conn->gensec); if (mem_ctx) talloc_destroy(mem_ctx); @@ -1696,6 +1694,9 @@ struct ldap_message *ldap_getsearchent(struct ldap_connection *conn, } result = ldap_receive(conn, conn->searchid, endtime); + if (!result) { + return NULL; + } if (result->type == LDAP_TAG_SearchResultEntry) return result; -- cgit