]> git.dujemihanovic.xyz Git - u-boot.git/commit
f_fastboot: Avoid use-after-free in the global pointer variable
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 3 Dec 2020 15:32:05 +0000 (17:32 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 31 Jan 2021 13:08:56 +0000 (14:08 +0100)
commit6ffc8e29934391e1569066ca1a1638d261839fa7
treeb5b314dad5e2917c6fe5ebe2fd9ea3c998d3c3d7
parentff52577c1b5188a5f25bd7d7d41730bb5de4b688
f_fastboot: Avoid use-after-free in the global pointer variable

In case of usb_add_function() failure the error path has an issue,
i.e the global pointer variable is assigned to garbage

Fix the above mentioned issue by assigning pointer to NULL.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/usb/gadget/f_fastboot.c