summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-11-12 14:09:56 +0100
committerDavid Disseldorp <ddiss@samba.org>2013-11-12 19:22:28 +0100
commit744abc882284bfde41b087bc06e13160b915f371 (patch)
tree69967d0a74a5a934534660eb3a12d8fc8dbc444f /source4
parent4cf8f105005b1f9839be3d9de6d41b5f90bdb158 (diff)
downloadsamba-744abc882284bfde41b087bc06e13160b915f371.tar.gz
samba-744abc882284bfde41b087bc06e13160b915f371.tar.xz
samba-744abc882284bfde41b087bc06e13160b915f371.zip
s4-dsdb: Fix a use after free segfault.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Nov 12 19:22:28 CET 2013 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index f905aa2423..7e1d2770a5 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -1373,6 +1373,7 @@ static void rootdse_fsmo_transfer_callback(struct tevent_req *treq)
int ret;
struct ldb_request *req = fsmo->req;
struct ldb_context *ldb = fsmo->ldb;
+ struct ldb_module *module = fsmo->module;
status = dcerpc_drepl_takeFSMORole_recv(treq, fsmo, &werr);
talloc_free(fsmo);
@@ -1382,7 +1383,7 @@ static void rootdse_fsmo_transfer_callback(struct tevent_req *treq)
* Now that it is failed, start the transaction up
* again so the wrappers can close it without additional error
*/
- ldb_next_start_trans(fsmo->module);
+ ldb_next_start_trans(module);
ldb_module_done(req, NULL, NULL, LDB_ERR_UNAVAILABLE);
return;
}
@@ -1392,7 +1393,7 @@ static void rootdse_fsmo_transfer_callback(struct tevent_req *treq)
* Now that it is failed, start the transaction up
* again so the wrappers can close it without additional error
*/
- ldb_next_start_trans(fsmo->module);
+ ldb_next_start_trans(module);
ldb_module_done(req, NULL, NULL, LDB_ERR_UNAVAILABLE);
return;
}
@@ -1401,7 +1402,7 @@ static void rootdse_fsmo_transfer_callback(struct tevent_req *treq)
* Now that it is done, start the transaction up again so the
* wrappers can close it without error
*/
- ret = ldb_next_start_trans(fsmo->module);
+ ret = ldb_next_start_trans(module);
ldb_module_done(req, NULL, NULL, ret);
}