Review radio metadata allocations/deallocations.
Bug: b/34054813 Test: VTS, manual Change-Id: I1cbd7baf5b852cd3d4cab374eb67289f3938fff3
This commit is contained in:
parent
3e9a5396b0
commit
33683bf92b
1 changed files with 6 additions and 1 deletions
|
@ -613,7 +613,12 @@ static int tuner_get_program_information(const struct radio_tuner *tuner,
|
|||
metadata = info->metadata;
|
||||
*info = stub_tuner->program;
|
||||
info->metadata = metadata;
|
||||
if (metadata != NULL && stub_tuner->program.metadata != NULL)
|
||||
if (metadata == NULL) {
|
||||
ALOGE("%s metadata is a nullptr", __func__);
|
||||
status = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
if (stub_tuner->program.metadata != NULL)
|
||||
radio_metadata_add_metadata(&info->metadata, stub_tuner->program.metadata);
|
||||
|
||||
exit:
|
||||
|
|
Loading…
Reference in a new issue