s3:net: adapt idmap check to new dbwrap_fetch behavior not to return success if not...
authorGregor Beck <gbeck@sernet.de>
Fri, 4 Nov 2011 09:55:47 +0000 (10:55 +0100)
committerMichael Adam <obnox@samba.org>
Sat, 3 Dec 2011 02:48:31 +0000 (03:48 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
source3/utils/net_idmap_check.c

index de654066ec666d6fca9328671e98de157f57fa67..b662a85792a81912c4f08738e889cca23d21c7fa 100644 (file)
@@ -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;
        }