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> |
---|
|
drivers/usb/gadget/dfu.c |
---|