1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

s4-ldb: ensure new dn_list elements are not owned by caller

This commit is contained in:
Andrew Tridgell 2009-10-22 11:16:30 +11:00
parent 129298c9b9
commit 1b48764f24

View File

@ -1105,7 +1105,7 @@ static int ltdb_index_add1(struct ldb_module *module, const char *dn,
talloc_free(list);
return LDB_ERR_OPERATIONS_ERROR;
}
list->dn[list->count].data = discard_const_p(unsigned char, dn);
list->dn[list->count].data = (uint8_t *)talloc_strdup(list->dn, dn);
list->dn[list->count].length = strlen(dn);
list->count++;