summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/modules/asq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ldb/modules/asq.c b/source4/lib/ldb/modules/asq.c
index 2ab04afe59..a06dd5391a 100644
--- a/source4/lib/ldb/modules/asq.c
+++ b/source4/lib/ldb/modules/asq.c
@@ -289,6 +289,9 @@ static int asq_requests(struct ldb_handle *handle) {
ac = talloc_get_type(handle->private_data, struct asq_context);
/* look up the DNs */
+ if (ac->base_res == NULL) {
+ return LDB_ERR_NO_SUCH_OBJECT;
+ }
el = ldb_msg_find_element(ac->base_res->message, ac->req_attribute);
/* no values found */
if (el == NULL) {