1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-22 02:50:28 +03:00

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>
This commit is contained in:
Andrew Tridgell 2009-12-22 12:21:02 +11:00
parent 9f053d43de
commit db3f0e8ec1

View File

@ -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