diff --git a/source/lib/ldb/modules/asq.c b/source/lib/ldb/modules/asq.c index da5afde2120..36ea0da2564 100644 --- a/source/lib/ldb/modules/asq.c +++ b/source/lib/ldb/modules/asq.c @@ -187,7 +187,9 @@ static int asq_reqs_callback(struct ldb_context *ldb, void *context, struct ldb_ goto error; } - ac = talloc_get_type(context, struct asq_context); + if (!(ac = talloc_get_type(context, struct asq_context))) { + goto error; + } /* we are interested only in the single reply (base search) we receive here */ if (ares->type == LDB_REPLY_ENTRY) {