summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-10-07 14:46:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:38 -0500
commitdba5773d9d0b2a92938b8f3c434a4d6ef17cc236 (patch)
treeeba37e641cfbc023a23ebb62e3b467b62421aae5
parent5bf740dfb8fddd4348cb707c17ed47132d3be13b (diff)
downloadsamba-dba5773d9d0b2a92938b8f3c434a4d6ef17cc236.tar.gz
samba-dba5773d9d0b2a92938b8f3c434a4d6ef17cc236.tar.bz2
samba-dba5773d9d0b2a92938b8f3c434a4d6ef17cc236.zip
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)
-rw-r--r--source4/libcli/ldap/ldap.c5
1 files changed, 3 insertions, 2 deletions
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;