From 14b5b729049d92c30ba518adb82c9396fdddd09f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 7 Dec 2012 11:02:49 +0100 Subject: [PATCH] s4:dsdb/acl_read: keep the ldb_message of the sub search (bug #9470) Some modules might not allocate values on the correct memory context. Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- source4/dsdb/samdb/ldb_modules/acl_read.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c b/source4/dsdb/samdb/ldb_modules/acl_read.c index 92744f28ba7..0b0f3636609 100644 --- a/source4/dsdb/samdb/ldb_modules/acl_read.c +++ b/source4/dsdb/samdb/ldb_modules/acl_read.c @@ -245,6 +245,11 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares) k++; } } + /* + * This should not be needed, but some modules + * may allocate values on the wrong context... + */ + talloc_steal(ret_msg->elements, msg); } else { ret_msg->elements = NULL; } -- 2.11.4.GIT