summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2011-11-04 10:55:47 +0100
committerMichael Adam <obnox@samba.org>2011-12-03 03:48:31 +0100
commit5bc44491d2c28db0a100f4e34f306dbabf84bb55 (patch)
treee7a03c46c0524d6c846266fba41491c6c6e99d36 /source3/utils
parenta3f600521122d1a6d74d16668bd1ea4447c5c867 (diff)
downloadsamba-5bc44491d2c28db0a100f4e34f306dbabf84bb55.tar.gz
samba-5bc44491d2c28db0a100f4e34f306dbabf84bb55.tar.bz2
samba-5bc44491d2c28db0a100f4e34f306dbabf84bb55.zip
s3:net: adapt idmap check to new dbwrap_fetch behavior not to return success if not found
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_idmap_check.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source3/utils/net_idmap_check.c b/source3/utils/net_idmap_check.c
index de654066ec..b662a85792 100644
--- a/source3/utils/net_idmap_check.c
+++ b/source3/utils/net_idmap_check.c
@@ -355,11 +355,8 @@ fetch_record(struct check_ctx* ctx, TALLOC_CTX* mem_ctx, TDB_DATA key)
NTSTATUS status;
status = dbwrap_fetch(ctx->diff, mem_ctx, key, &tmp);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("Out of memory!\n"));
- return tdb_null;
- }
- if (tmp.dptr != NULL) {
+
+ if (NT_STATUS_IS_OK(status)) {
TDB_DATA_diff diff = unpack_diff(tmp);
TDB_DATA ret = talloc_copy(mem_ctx, diff.nval);
talloc_free(tmp.dptr);
@@ -368,7 +365,6 @@ fetch_record(struct check_ctx* ctx, TALLOC_CTX* mem_ctx, TDB_DATA key)
status = dbwrap_fetch(ctx->db, mem_ctx, key, &tmp);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("Out of memory!\n"));
return tdb_null;
}