From ab1e121b76a953f89592df8ec471603715b57dfc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Jun 2005 02:45:40 +0000 Subject: r7665: - added a ildap_*() interface to our internal ldap library. This interface is very similar to the traditional ldap interface, and will be used as part of a ldb backend based on the current ldb_ldap backend - fixed some allocation issues in ldb_msg.c (This used to be commit b34a29dcf26f68a2f47380a6c74a4095fdfd2fbe) --- source4/libcli/ldap/ldap_msg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/libcli/ldap/ldap_msg.c') diff --git a/source4/libcli/ldap/ldap_msg.c b/source4/libcli/ldap/ldap_msg.c index 5ac44a5226..901c42a62a 100644 --- a/source4/libcli/ldap/ldap_msg.c +++ b/source4/libcli/ldap/ldap_msg.c @@ -44,7 +44,7 @@ BOOL add_value_to_attrib(TALLOC_CTX *mem_ctx, struct ldb_val *value, return False; attrib->values[attrib->num_values] = - data_blob_talloc(mem_ctx, value->data, value->length); + data_blob_talloc(attrib->values, value->data, value->length); attrib->num_values += 1; return True; } @@ -63,6 +63,8 @@ BOOL add_attrib_to_array_talloc(TALLOC_CTX *mem_ctx, return False; (*attribs)[*num_attribs] = *attrib; + talloc_steal(*attribs, attrib->values); + talloc_steal(*attribs, attrib->name); *num_attribs += 1; return True; } -- cgit