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:
parent
e8e1a74da3
commit
e25af2bc4f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user