usb: gadget: dfu: Reset global variables on unbind
Global variables must be reset to their default value before a new
dfu_bind is done. Otherwise things wont work and are likely to cause
a system crash due to a use after free: the global dfu_files was still
pointing deallocated structure after unbind.

Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 6c42b62 commit 556be205d8c4f15b7a7d16f2dd126af2a95aa1fd
@Jules Maselbas Jules Maselbas authored on 26 Mar 2020
Sascha Hauer committed on 31 Mar 2020
Showing 1 changed file
View
drivers/usb/gadget/dfu.c