diff options
author | Andrew Kroeger <andrew@id10ts.net> | 2009-09-10 10:04:47 -0500 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-09-11 07:29:56 +1000 |
commit | 45b7b713a3aadec896ed1bd1bdef1a941b1abc1b (patch) | |
tree | 12f3436f5128e1c4aa852ae450050b1fb6be1c32 /source4/lib | |
parent | 0c8eee971172f74a896d9e8c499efd9805491fd9 (diff) | |
download | samba-45b7b713a3aadec896ed1bd1bdef1a941b1abc1b.tar.gz samba-45b7b713a3aadec896ed1bd1bdef1a941b1abc1b.tar.bz2 samba-45b7b713a3aadec896ed1bd1bdef1a941b1abc1b.zip |
s4:ldb_map: Don't free ares too early.
As found when running "make test" with the MALLOC_CHECK_ and MALLOC_PERTURB_
environment variables set.
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/ldb_map/ldb_map_outbound.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/ldb_map/ldb_map_outbound.c b/source4/lib/ldb/ldb_map/ldb_map_outbound.c index 4487d7e763..5f5be89976 100644 --- a/source4/lib/ldb/ldb_map/ldb_map_outbound.c +++ b/source4/lib/ldb/ldb_map/ldb_map_outbound.c @@ -1250,15 +1250,15 @@ static int map_remote_search_callback(struct ldb_request *req, ares->response, LDB_SUCCESS); } - talloc_free(ares); - /* reset the pointer to the start of the list */ ac->r_current = ac->r_list; /* no entry just return */ if (ac->r_current == NULL) { - return ldb_module_done(ac->req, ares->controls, + ret = ldb_module_done(ac->req, ares->controls, ares->response, LDB_SUCCESS); + talloc_free(ares); + return ret; } ret = map_search_local(ac); |