HID: intel-ish-hid: Fix a use after free in load_fw_from_host()
We have to print the filename first before we can kfree it.
Fixes: 91b228107d
("HID: intel-ish-hid: ISH firmware loader client driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Родитель
3ed224e273
Коммит
21acee4ecf
|
@ -816,9 +816,9 @@ static int load_fw_from_host(struct ishtp_cl_data *client_data)
|
|||
goto end_err_fw_release;
|
||||
|
||||
release_firmware(fw);
|
||||
kfree(filename);
|
||||
dev_info(cl_data_to_dev(client_data), "ISH firmware %s loaded\n",
|
||||
filename);
|
||||
kfree(filename);
|
||||
return 0;
|
||||
|
||||
end_err_fw_release:
|
||||
|
|
Загрузка…
Ссылка в новой задаче