summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-22 15:10:00 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-22 17:10:52 +0200
commit4676e7f65df5e6743ed2319e64d787429c23faf0 (patch)
tree7faff0511c3edb48bea2341ec7667ffc79205704
parent0f25bd78ca0ddbeff971d72791687ab25d6b33e4 (diff)
downloadsamba-4676e7f65df5e6743ed2319e64d787429c23faf0.tar.gz
samba-4676e7f65df5e6743ed2319e64d787429c23faf0.tar.bz2
samba-4676e7f65df5e6743ed2319e64d787429c23faf0.zip
dbwrap: don't ignore the result of dbwrap_parse_record in dbwrap_fetch_int32()
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 22 17:10:52 CEST 2012 on sn-devel-104
-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;