summaryrefslogtreecommitdiff
path: root/source3/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/ldb')
-rw-r--r--source3/lib/ldb/modules/asq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/ldb/modules/asq.c b/source3/lib/ldb/modules/asq.c
index 5bda383b44..7d23202303 100644
--- a/source3/lib/ldb/modules/asq.c
+++ b/source3/lib/ldb/modules/asq.c
@@ -361,8 +361,10 @@ static int asq_wait_none(struct ldb_handle *handle)
handle->state = LDB_ASYNC_PENDING;
handle->status = LDB_SUCCESS;
- ac = talloc_get_type(handle->private_data, struct asq_context);
-
+ if (!(ac = talloc_get_type(handle->private_data,
+ struct asq_context))) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
switch (ac->step) {
case ASQ_SEARCH_BASE: