Skip to content

Commit 36fb6a3

Browse files
committed
Merge tag 'imx-fixes-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes
i.MX fixes for 6.6, round 2: - Fix an use_after_free bug in imx_dsp_setup_channels() that is introduced by commit e527adf ("firmware: imx-dsp: Fix an error handling path in imx_dsp_setup_channels()") * tag 'imx-fixes-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware/imx-dsp: Fix use_after_free in imx_dsp_setup_channels() Link: https://lore.kernel.org/r/20231015090202.GW819755@dragon Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 606c577 + 1558b1a commit 36fb6a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/imx/imx-dsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ static int imx_dsp_setup_channels(struct imx_dsp_ipc *dsp_ipc)
114114
dsp_chan->idx = i % 2;
115115
dsp_chan->ch = mbox_request_channel_byname(cl, chan_name);
116116
if (IS_ERR(dsp_chan->ch)) {
117-
kfree(dsp_chan->name);
118117
ret = PTR_ERR(dsp_chan->ch);
119118
if (ret != -EPROBE_DEFER)
120119
dev_err(dev, "Failed to request mbox chan %s ret %d\n",
121120
chan_name, ret);
121+
kfree(dsp_chan->name);
122122
goto out;
123123
}
124124

0 commit comments

Comments
 (0)