Commit 21acee4e authored by Dan Carpenter's avatar Dan Carpenter Committed by Jiri Kosina

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: 91b22810 ("HID: intel-ish-hid: ISH firmware loader client driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 3ed224e2
......@@ -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:
......
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