diff options
-rw-r--r-- | source4/torture/ldap/nested_search.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/ldap/nested_search.c b/source4/torture/ldap/nested_search.c index 47299c2c21..9699919ecc 100644 --- a/source4/torture/ldap/nested_search.c +++ b/source4/torture/ldap/nested_search.c @@ -60,11 +60,13 @@ static int nested_search_callback(struct ldb_request *req, "defaultNamingContext", NULL }; + enum ldb_reply_type type; sctx = talloc_get_type(req->context, struct nested_search_context); + type = ares->type; /* sanity check */ - switch (ares->type) { + switch (type) { case LDB_REPLY_ENTRY: torture_comment(sctx->tctx, "nested_search_callback: LDB_REPLY_ENTRY\n"); ldb_msg = ares->message; @@ -89,7 +91,7 @@ static int nested_search_callback(struct ldb_request *req, } /* not a search reply, then get out */ - if (ares->type != LDB_REPLY_ENTRY) { + if (type != LDB_REPLY_ENTRY) { return res; } |