From 508a04fe579ae3fcb9480f8e951cb6eaaf620d19 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 16 Oct 2006 02:45:18 +0000 Subject: r19312: This should fix a nasty bug with values and names being freed before the results where used. Seem that el is hanging out of a request, and the target is put on the final results. Still one to catch and fix, but this seem to cure most of them (This used to be commit bfeaa08fde805439dbda974be6fcb692957b00f1) --- source4/lib/ldb/modules/ldb_map_outbound.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/modules/ldb_map_outbound.c b/source4/lib/ldb/modules/ldb_map_outbound.c index e1b207f6eb..02876eea55 100644 --- a/source4/lib/ldb/modules/ldb_map_outbound.c +++ b/source4/lib/ldb/modules/ldb_map_outbound.c @@ -202,7 +202,11 @@ static int ldb_msg_replace(struct ldb_message *msg, const struct ldb_message_ele } } - *old = *el; /* copy new element */ + /* copy new element */ + *old = *el; + /* and make sure we reference the contents */ + talloc_reference(msg->elements, el->name); + talloc_reference(msg->elements, el->values); return 0; } -- cgit