s4:ldb - Free the asynchronous result
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 13 Aug 2009 23:39:56 +0000 (01:39 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 13 Aug 2009 23:56:33 +0000 (01:56 +0200)
source4/lib/ldb/common/ldb.c

index 164e5a95a045c6f98c26f616846a11629a455232..38cc0c880b224f0fd38229ee8784935e6ba1b7eb 100644 (file)
@@ -677,10 +677,12 @@ int ldb_search_default_callback(struct ldb_request *req,
                /* this is the last message, and means the request is done */
                /* we have to signal and eventual ldb_wait() waiting that the
                 * async request operation was completed */
+               talloc_free(ares);
                return ldb_request_done(req, LDB_SUCCESS);
        }
 
        talloc_free(ares);
+
        return LDB_SUCCESS;
 }