diff options
Diffstat (limited to 'source4/libcli/ldap/ldap_msg.c')
-rw-r--r-- | source4/libcli/ldap/ldap_msg.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |