lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit b7718522 authored by Christian Engelmayer's avatar Christian Engelmayer Committed by Mauro Carvalho Chehab

[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: default avatarChristian Engelmayer <cengelma@gmx.at>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 2ff56fad
...@@ -198,6 +198,7 @@ int as102_fw_upload(struct as10x_bus_adapter_t *bus_adap) ...@@ -198,6 +198,7 @@ int as102_fw_upload(struct as10x_bus_adapter_t *bus_adap)
pr_info("%s: firmware: %s loaded with success\n", pr_info("%s: firmware: %s loaded with success\n",
DRIVER_NAME, fw1); DRIVER_NAME, fw1);
release_firmware(firmware); release_firmware(firmware);
firmware = NULL;
/* wait for boot to complete */ /* wait for boot to complete */
mdelay(100); mdelay(100);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment