diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/ldap/ldap_ildap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index 10fe8e4916..8b6f8e8ddd 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -119,8 +119,12 @@ _PUBLIC_ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, struct ldb_control ***control_res, struct ldap_message ***results) { - struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression); NTSTATUS status; + struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression); + + if (tree == NULL) { + return NT_STATUS_INVALID_PARAMETER; + } status = ildap_search_bytree(conn, basedn, scope, tree, attrs, attributesonly, control_req, control_res, results); |