svn commit: samba r18438 - in branches/SAMBA_4_0/source/lib/ldb:
common ldb_ildap modules
tridge at samba.org
tridge at samba.org
Wed Sep 13 02:03:20 GMT 2006
Author: tridge
Date: 2006-09-13 02:03:20 +0000 (Wed, 13 Sep 2006)
New Revision: 18438
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18438
Log:
I should have examined these uses of talloc_move() more
carefully. Most of them are OK, but a couple were not.
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2006-09-13 00:11:07 UTC (rev 18437)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2006-09-13 02:03:20 UTC (rev 18438)
@@ -548,10 +548,7 @@
res->refs[n + 1] = NULL;
}
- if (ares->controls) {
- res->controls = talloc_move(res, ares->controls);
- }
-
+ talloc_steal(res, ares->controls);
talloc_free(ares);
return LDB_SUCCESS;
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-09-13 00:11:07 UTC (rev 18437)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-09-13 02:03:20 UTC (rev 18438)
@@ -381,7 +381,6 @@
return LDB_ERR_OPERATIONS_ERROR;
}
- ildb_ac->req = talloc_move(ildb_ac, req);
talloc_free(req->time_event);
req->time_event = NULL;
if (timeout) {
@@ -392,6 +391,7 @@
req->async.fn = ildb_callback;
req->async.private_data = (void *)h;
+ ildb_ac->req = talloc_move(ildb_ac, req);
*handle = h;
return LDB_SUCCESS;
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c 2006-09-13 00:11:07 UTC (rev 18437)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c 2006-09-13 02:03:20 UTC (rev 18438)
@@ -190,7 +190,7 @@
ac->store->num_entries++;
- ac->store->last->r = talloc_move(ac->store->last, ares);
+ ac->store->last->r = talloc_steal(ac->store->last, ares);
ac->store->last->next = NULL;
}
@@ -205,14 +205,12 @@
goto error;
}
- ac->store->last_ref->r = talloc_move(ac->store->last, ares);
+ ac->store->last_ref->r = talloc_steal(ac->store->last, ares);
ac->store->last_ref->next = NULL;
}
if (ares->type == LDB_REPLY_DONE) {
- if (ares->controls) {
- ac->store->controls = talloc_move(ac->store, ares->controls);
- }
+ ac->store->controls = talloc_move(ac->store, ares->controls);
talloc_free(ares);
}
More information about the samba-cvs
mailing list