ipc: Fix typo in error checking

Found a oss-fuzz error I thought I'd fixed being reported again.
Turns out the fix had a typo and only fixed half the problem space.
Need to check source and sink, not source and source!

Signed-off-by: Andy Ross <andyross@google.com>
This commit is contained in:
Andy Ross 2023-06-22 11:51:59 -07:00 committed by Liam Girdwood
parent eac223d4b9
commit 192d1dfc5f
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ int ipc_comp_free(struct ipc *ipc, uint32_t comp_id)
return -EINVAL;
}
if (!icd->cd->bsource_list.next || !icd->cd->bsource_list.next) {
if (!icd->cd->bsource_list.next || !icd->cd->bsink_list.next) {
/* Unfortunate: the buffer list node gets initialized
* at the component level and thus can contain NULLs
* (which is an invalid list!) if the component's