summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/dbwrap/dbwrap_util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/dbwrap/dbwrap_util.c b/lib/dbwrap/dbwrap_util.c
index 8452070782..119c7e1137 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;