summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'libcli')
-rw-r--r--libcli/cldap/cldap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c
index c5977cc994a..87f82b9b0de 100644
--- a/libcli/cldap/cldap.c
+++ b/libcli/cldap/cldap.c
@@ -585,6 +585,11 @@ struct tevent_req *cldap_search_send(TALLOC_CTX *mem_ctx,
talloc_set_destructor(state, cldap_search_state_destructor);
+ if (state->caller.cldap == NULL) {
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ goto post;
+ }
+
if (io->in.dest_address) {
if (cldap->connected) {
tevent_req_nterror(req, NT_STATUS_PIPE_CONNECTED);