提交 ec73b9fd 编写于 作者: C Christian Engelmayer 提交者: Mauro Carvalho Chehab

[media] si2165: Fix possible leak in si2165_upload_firmware()

In case of an error function si2165_upload_firmware() releases the already
requested firmware in the exit path. However, there is one deviation where
the function directly returns. Use the correct cleanup so that the firmware
memory gets freed correctly. Detected by Coverity CID 1269120.
Signed-off-by: NChristian Engelmayer <cengelma@gmx.at>
Signed-off-by: NMatthias Schwarzott <zzam@gentoo.org>
Reviewed-by: NLuis de Bethencourt <luis.bg@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 51b5b3d6
......@@ -505,7 +505,7 @@ static int si2165_upload_firmware(struct si2165_state *state)
/* reset crc */
ret = si2165_writereg8(state, 0x0379, 0x01);
if (ret)
return ret;
goto error;
ret = si2165_upload_firmware_block(state, data, len,
&offset, block_count);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册