firmware_loader: Fix memory leak in firmware upload
commit 789bba82 upstream. In the case of firmware-upload, an instance of struct fw_upload is allocated in firmware_upload_register(). This data needs to be freed in fw_dev_release(). Create a new fw_upload_free() function in sysfs_upload.c to handle the firmware-upload specific memory frees and incorporate the missing kfree call for the fw_upload structure. Fixes: 97730bbb ("firmware_loader: Add firmware-upload support") Cc: stable <stable@kernel.org> Signed-off-by:Russ Weight <russell.h.weight@intel.com> Link: https://lore.kernel.org/r/20220831002518.465274-1-russell.h.weight@intel.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
d380d409
Please register or sign in to comment