git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83e9b1c
)
Revert "s4-ldb: fixed a memory leak"
author
Andrew Tridgell
<tridge@samba.org>
Fri, 2 Oct 2009 12:38:58 +0000
(22:38 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Fri, 2 Oct 2009 12:38:58 +0000
(22:38 +1000)
This reverts commit
c7358d989034c9d936c04f2a7e4f89db252b798e
.
source4/lib/ldb/ldb_tdb/ldb_index.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/ldb_tdb/ldb_index.c
b/source4/lib/ldb/ldb_tdb/ldb_index.c
index 66d70a9f47ea772e1f0348a2a86293a5fd19c24d..1acbc204f7f13d44673c1bfc3d6349a4149dc7ef 100644
(file)
--- 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 */