r18317: Make sure we actually have a valid reply or fail
authorSimo Sorce <idra@samba.org>
Sun, 10 Sep 2006 03:11:03 +0000 (03:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:07 +0000 (14:18 -0500)
source/lib/ldb/modules/asq.c

index 2ab04afe59494f99d7dc9e53be78d76364c21184..a06dd5391a5789a3932c56b685fd5877240b98e3 100644 (file)
@@ -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) {