summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-22 12:21:02 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:54 +1100
commitdb3f0e8ec1bfc6d3f27195ee38f53489501e731e (patch)
tree2991f4edfc0c8be8bd778c2db0c5bc8704311b4f
parent9f053d43ded23bb72d4c10162a8c6a211831b068 (diff)
downloadsamba-db3f0e8ec1bfc6d3f27195ee38f53489501e731e.tar.gz
samba-db3f0e8ec1bfc6d3f27195ee38f53489501e731e.tar.bz2
samba-db3f0e8ec1bfc6d3f27195ee38f53489501e731e.zip
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 <abartlet@samba.org>
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c2
1 files changed, 1 insertions, 1 deletions
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