From 4676e7f65df5e6743ed2319e64d787429c23faf0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 22 Jun 2012 15:10:00 +0200 Subject: [PATCH] dbwrap: don't ignore the result of dbwrap_parse_record in dbwrap_fetch_int32() metze Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Fri Jun 22 17:10:52 CEST 2012 on sn-devel-104 --- lib/dbwrap/dbwrap_util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/dbwrap/dbwrap_util.c b/lib/dbwrap/dbwrap_util.c index 84520707829..119c7e11374 100644 --- a/lib/dbwrap/dbwrap_util.c +++ b/lib/dbwrap/dbwrap_util.c @@ -49,6 +49,7 @@ NTSTATUS dbwrap_fetch_int32(struct db_context *db, TDB_DATA key, int32_t *result) { struct dbwrap_fetch_int32_state state; + NTSTATUS status; if (result == NULL) { return NT_STATUS_INVALID_PARAMETER; @@ -56,7 +57,10 @@ NTSTATUS dbwrap_fetch_int32(struct db_context *db, TDB_DATA key, state.status = NT_STATUS_INTERNAL_ERROR; - dbwrap_parse_record(db, key, dbwrap_fetch_int32_parser, &state); + status = dbwrap_parse_record(db, key, dbwrap_fetch_int32_parser, &state); + if (!NT_STATUS_IS_OK(status)) { + return status; + } if (NT_STATUS_IS_OK(state.status)) { *result = state.result; -- 2.11.4.GIT