From 192d1dfc5fbf1be811d2400f327db76574cdb49b Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 22 Jun 2023 11:51:59 -0700 Subject: [PATCH] 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 --- src/ipc/ipc-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc/ipc-helper.c b/src/ipc/ipc-helper.c index 00119ce54..0098a36cc 100644 --- a/src/ipc/ipc-helper.c +++ b/src/ipc/ipc-helper.c @@ -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