1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib:util: Check return value of tdb_parse_record()

This makes covscan happy.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Andreas Schneider 2021-12-10 15:06:03 +01:00 committed by Jeremy Allison
parent e8e1a74da3
commit e25af2bc4f

View File

@ -142,8 +142,11 @@ static int fetch_int32_parser(TDB_DATA key, TDB_DATA data, void *private_data)
static int32_t tdb_fetch_int32_byblob(struct tdb_context *tdb, TDB_DATA key)
{
int v = -1;
tdb_parse_record(tdb, key, fetch_int32_parser, &v);
int32_t v = -1;
int32_t ret = tdb_parse_record(tdb, key, fetch_int32_parser, &v);
if (ret == -1) {
return ret;
}
return v;
}