mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
[media] as102: fix potential double free in as102_fw_upload()
In case the request to locate the firmware file part 2 fails, the error path releases the already freed firmware memory location again. Thus reset the firmware pointer to NULL after releasing firmware file part 1. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
2ff56fadd9
commit
b771852270
1 changed files with 1 additions and 0 deletions
|
@ -198,6 +198,7 @@ int as102_fw_upload(struct as10x_bus_adapter_t *bus_adap)
|
|||
pr_info("%s: firmware: %s loaded with success\n",
|
||||
DRIVER_NAME, fw1);
|
||||
release_firmware(firmware);
|
||||
firmware = NULL;
|
||||
|
||||
/* wait for boot to complete */
|
||||
mdelay(100);
|
||||
|
|
Loading…
Reference in a new issue