1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

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 c0d9e7d473)
This commit is contained in:
Andrew Tridgell
2006-09-13 00:10:38 +00:00
committed by Gerald (Jerry) Carter
parent 1a59784451
commit 7f63cebd33
11 changed files with 31 additions and 76 deletions

View File

@ -865,11 +865,7 @@ static int lsql_search_sync_callback(struct ldb_context *ldb, void *context, str
res->msgs[res->count + 1] = NULL;
res->msgs[res->count] = talloc_steal(res->msgs, ares->message);
if (! res->msgs[res->count]) {
goto error;
}
res->msgs[res->count] = talloc_move(res->msgs, ares->message);
res->count++;
} else {
ldb_debug(ldb, LDB_DEBUG_ERROR, "unrecognized async reply in ltdb_search_sync_callback!\n");