summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-13 00:10:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:29 -0500
commit7f63cebd331793d059b1dbfd2f7d7ce38105c4fe (patch)
treeb23bdbb55ec7f8b4598bd3da0022a25873e49afe /source4/lib/ldb/ldb_tdb
parent1a5978445199a1d8697a5604761899aa065059fe (diff)
downloadsamba-7f63cebd331793d059b1dbfd2f7d7ce38105c4fe.tar.gz
samba-7f63cebd331793d059b1dbfd2f7d7ce38105c4fe.tar.bz2
samba-7f63cebd331793d059b1dbfd2f7d7ce38105c4fe.zip
r18436: converted ldb to use talloc_move() instead of talloc_steal() when
appropriate. Note that I also removed the error checks that were being done on the result of talloc_steal(). They are pointless as talloc_steal() doesn't have any failure modes that wouldn't cause a segv anyway, and they tend to clutter the code (This used to be commit c0d9e7d473b8e3eb2524a9fc29cf88680f994b36)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c8
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index b628c31b09..f2816ec1da 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -378,7 +378,7 @@ static int list_intersect(struct ldb_context *ldb,
for (i=0;i<list->count;i++) {
if (ldb_list_find(list->dn[i], list2->dn, list2->count,
sizeof(char *), (comparison_fn_t)strcmp) != -1) {
- list3->dn[list3->count] = talloc_steal(list3->dn, list->dn[i]);
+ list3->dn[list3->count] = talloc_move(list3->dn, list->dn[i]);
list3->count++;
} else {
talloc_free(list->dn[i]);
@@ -386,7 +386,7 @@ static int list_intersect(struct ldb_context *ldb,
}
talloc_free(list->dn);
- list->dn = talloc_steal(list, list3->dn);
+ list->dn = talloc_move(list, list3->dn);
list->count = list3->count;
talloc_free(list3);
@@ -486,7 +486,7 @@ static int ltdb_index_dn_or(struct ldb_module *module,
if (ret == -1) {
ret = 1;
- list->dn = talloc_steal(list, list2->dn);
+ list->dn = talloc_move(list, list2->dn);
list->count = list2->count;
} else {
if (list_union(ldb, list, list2) == -1) {
@@ -567,7 +567,7 @@ static int ltdb_index_dn_and(struct ldb_module *module,
if (ret == -1) {
ret = 1;
talloc_free(list->dn);
- list->dn = talloc_steal(list, list2->dn);
+ list->dn = talloc_move(list, list2->dn);
list->count = list2->count;
} else {
if (list_intersect(ldb, list, list2) == -1) {
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index 6a35595d52..612ca5c0fe 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -312,7 +312,7 @@ int ltdb_add_attr_results(struct ldb_module *module,
(*res) = res2;
- (*res)[*count] = talloc_steal(*res, msg2);
+ (*res)[*count] = talloc_move(*res, msg2);
(*res)[(*count)+1] = NULL;
(*count)++;