Skip to content

Commit edd1f93

Browse files
abonislawskilgirdwood
authored andcommitted
ipc4: chain_dma: free stale ipc_comp_dev on error path
When ipc4_chain_dma_state() fails for a freshly created chain DMA unlink and free the ipc_comp_dev as well, not just the comp_dev Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
1 parent eb6a85f commit edd1f93

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/ipc/ipc4/handler-user.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ __cold static int ipc4_process_chain_dma(struct ipc4_message_request *ipc4)
601601
ret = ipc4_chain_dma_state(cdma_comp->cd, &cdma);
602602
if (ret < 0) {
603603
comp_free(cdma_comp->cd);
604+
list_item_del(&cdma_comp->list);
605+
rfree(cdma_comp);
604606
return IPC4_FAILURE;
605607
}
606608

0 commit comments

Comments
 (0)