From 5338e42182ee34f20fde104006a752662099af22 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Wed, 3 Mar 2010 02:33:31 +0200 Subject: [PATCH] s4/ildap: fine tune ildb_callback() Actually ildb_context pointer is not supposed to be valid after calling ildb_request_done(). This is due to the fact that when calling ildb_request_done() caller will (most probably) free any locally built ldap_request objects - thus rendering ildb_context invalid. Signed-off-by: Andrew Bartlett --- source4/lib/ldb/ldb_ildap/ldb_ildap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index 3110008c9fb..9f81c4e5348 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -383,13 +383,13 @@ static void ildb_callback(struct ldap_request *req) } } + /* mark the request as not being in progress */ + ac->in_ildb_callback = false; + if (request_done) { ildb_request_done(ac, controls, ret); } - /* unmark the request as beign in progress */ - ac->in_ildb_callback = false; - return; } -- 2.34.1