summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-03 04:03:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:29 -0500
commitdf9d1a3709bdfe793ae124b0303fccc0b558f180 (patch)
tree8109c630946856337aacf052f0dc7be18cd206f8 /source4
parente951ffa761140541041da6ba816f55fc6dbb3337 (diff)
downloadsamba-df9d1a3709bdfe793ae124b0303fccc0b558f180.tar.gz
samba-df9d1a3709bdfe793ae124b0303fccc0b558f180.tar.bz2
samba-df9d1a3709bdfe793ae124b0303fccc0b558f180.zip
r5189: fixed a double free bug in the ltdb indexing code
(This used to be commit 7be0bc93bd6757e52fd10bd3d3b3d1a8f5221452)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index af325f9203..c7dc9f1345 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -209,7 +209,6 @@ static int ltdb_index_dn_simple(struct ldb_module *module,
list->dn[list->count] =
talloc_strdup(list->dn, (char *)el->values[j].data);
if (!list->dn[list->count]) {
- talloc_free(list);
return -1;
}
list->count++;
@@ -309,7 +308,6 @@ static int list_intersect(struct ldb_context *ldb,
if (list->count == 0 || list2->count == 0) {
/* 0 & X == 0 */
- talloc_free(list);
return 0;
}
@@ -320,7 +318,6 @@ static int list_intersect(struct ldb_context *ldb,
list3->dn = talloc_array(list3, char *, list->count);
if (!list3->dn) {
- talloc_free(list);
talloc_free(list3);
return -1;
}
@@ -359,13 +356,11 @@ static int list_union(struct ldb_context *ldb,
if (list->count == 0 && list2->count == 0) {
/* 0 | 0 == 0 */
- talloc_free(list);
return 0;
}
d = talloc_realloc(list, list->dn, char *, list->count + list2->count);
if (!d) {
- talloc_free(list);
return -1;
}
list->dn = d;
@@ -375,7 +370,6 @@ static int list_union(struct ldb_context *ldb,
sizeof(char *), (comparison_fn_t)strcmp) == -1) {
list->dn[list->count] = talloc_strdup(list->dn, list2->dn[i]);
if (!list->dn[list->count]) {
- talloc_free(list);
return -1;
}
list->count++;
@@ -453,7 +447,6 @@ static int ltdb_index_dn_or(struct ldb_module *module,
}
if (list->count == 0) {
- talloc_free(list);
return 0;
}