Fix cleanup.
authorSimo Sorce <idra@samba.org>
Sun, 15 Jun 2008 15:15:12 +0000 (11:15 -0400)
committerSimo Sorce <idra@samba.org>
Sun, 15 Jun 2008 19:06:26 +0000 (15:06 -0400)
source/lib/ldb/ldb_ildap/ldb_ildap.c

index f0a34b622318184f1eaa724108e8de4b49ae1cec..5ad671ea2ea16e505c1cfdf821cc79a8e76c4405 100644 (file)
@@ -146,7 +146,10 @@ static void ildb_request_timeout(struct event_context *ev,
                                 struct timeval t, void *private_data)
 {
        struct ildb_context *ac;
-       struct ldb_handle *handle = ac->handle;
+       struct ldb_handle *handle;
+
+       ac = talloc_get_type(private_data, struct ildb_context);
+       handle = ac->handle;
 
        ac = talloc_get_type(private_data, struct ildb_context);
 
@@ -162,12 +165,14 @@ static void ildb_request_timeout(struct event_context *ev,
 static void ildb_callback(struct ldap_request *req)
 {
        struct ildb_context *ac;
-       struct ldb_handle *handle = ac->handle;
-       struct ildb_private *ildb = ac->ildb;
+       struct ldb_handle *handle;
+       struct ildb_private *ildb;
        NTSTATUS status;
        int i;
 
-       ac =talloc_get_type(req->async.private_data, struct ildb_context);
+       ac = talloc_get_type(req->async.private_data, struct ildb_context);
+       ildb = ac->ildb;
+       handle = ac->handle;
        handle->status = LDB_SUCCESS;
 
        if (!NT_STATUS_IS_OK(req->status)) {