summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-02 22:38:58 +1000
committerAndrew Tridgell <tridge@samba.org>2009-10-02 22:38:58 +1000
commit81c193da0945ea2dd355590a121ec83d77a594bd (patch)
tree4dc225423a3c36b7e0a0cb030a9d8fcbbf1f661d /source4/lib/ldb/ldb_tdb
parent83e9b1c325964a016b499ad124d161eb20f6c26c (diff)
downloadsamba-81c193da0945ea2dd355590a121ec83d77a594bd.tar.gz
samba-81c193da0945ea2dd355590a121ec83d77a594bd.tar.bz2
samba-81c193da0945ea2dd355590a121ec83d77a594bd.zip
Revert "s4-ldb: fixed a memory leak"
This reverts commit c7358d989034c9d936c04f2a7e4f89db252b798e.
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index 66d70a9f47..1acbc204f7 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -135,7 +135,6 @@ static int ltdb_convert_from_idxptr(struct ldb_module *module, struct ldb_messag
return LDB_ERR_OPERATIONS_ERROR;
}
- talloc_free(el->values);
*el = ptr->el;
if (ptr_out) {
@@ -164,11 +163,7 @@ static int ltdb_update_idxptr(struct ldb_module *module, TALLOC_CTX *mem_ctx,
el->values = val2;
el->num_values = 1;
- if (strcmp(el->name, LTDB_IDXPTR) == 0) {
- abort();
- }
-
- el->values[0].data = talloc_memdup(val2, &ptr, sizeof(ptr));
+ el->values[0].data = talloc_memdup(el->values, &ptr, sizeof(ptr));
el->values[0].length = sizeof(ptr);
/* update the name */