dbwrap: intialize state.status in dbwrap_fetch_int32()
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Jun 2012 13:08:22 +0000 (15:08 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 22 Jun 2012 13:16:53 +0000 (15:16 +0200)
This might not be needed, but it makes it more clear that
we won't use uninitialized memory, it the callback was not triggered.

metze

lib/dbwrap/dbwrap_util.c

index b1efae7221372fd4791af0263b69351955d2da9b..84520707829f61d45baa4138a1193969d0ba61a6 100644 (file)
@@ -54,6 +54,8 @@ NTSTATUS dbwrap_fetch_int32(struct db_context *db, TDB_DATA key,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
+       state.status = NT_STATUS_INTERNAL_ERROR;
+
        dbwrap_parse_record(db, key, dbwrap_fetch_int32_parser, &state);
 
        if (NT_STATUS_IS_OK(state.status)) {