From 335af02218fbee7b02cbd1e4e6b40acff288465f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 30 Dec 2009 21:36:31 +1100 Subject: s4-ldb: fixed valgrind error: ares can be freed by callback --- source4/lib/ldb/common/ldb_modules.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index 5e9d0e6e98..3b8934702a 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -829,10 +829,7 @@ int ldb_module_done(struct ldb_request *req, ldb_debug_end(req->handle->ldb, LDB_DEBUG_TRACE); } - req->callback(req, ares); - /* returning ares->error here allows the callback routines in - modules to override the error code */ - return ares->error; + return req->callback(req, ares); } /* to be used *only* in modules init functions. -- cgit