From 1a87c9b5994662de8bcd7c080dafb792dedb9f46 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Jun 2016 16:41:15 +1200 Subject: [PATCH] repl: Avoid use-after-free when working with the working_schema The original schema must live as long as the working_schema as the working_schema starts as a shallow-copy of schema. Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam BUG: https://bugzilla.samba.org/show_bug.cgi?id=11953 Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue Jun 7 14:33:39 CEST 2016 on sn-devel-144 --- source4/dsdb/repl/drepl_out_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c index 6493c1ea498..64816ad2725 100644 --- a/source4/dsdb/repl/drepl_out_helpers.c +++ b/source4/dsdb/repl/drepl_out_helpers.c @@ -709,7 +709,7 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req return; } - schema = dsdb_get_schema(service->samdb, NULL); + schema = dsdb_get_schema(service->samdb, state); if (!schema) { DEBUG(0,(__location__ ": Schema is not loaded yet!\n")); tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR); -- 2.11.4.GIT