From db3f0e8ec1bfc6d3f27195ee38f53489501e731e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 22 Dec 2009 12:21:02 +1100 Subject: s4-dsdb: fixed valgrind error in replmd modify We are using the values from a search result, so we need to steal them onto the msg before we free the search results Pair-Programmed-With: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/dsdb/samdb/ldb_modules') diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 5bf43857cc..3c713ec4d9 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -1880,7 +1880,7 @@ static int replmd_modify_handle_linked_attribs(struct ldb_module *module, } ldb_msg_add_empty(old_msg, el->name, 0, &new_el); new_el->num_values = el->num_values; - new_el->values = el->values; + new_el->values = talloc_steal(msg->elements, el->values); /* TODO: this relises a bit too heavily on the exact behaviour of ldb_msg_find_element and -- cgit