Skip to content
Commit ff52577c authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Marek Vasut
Browse files

f_rockusb: Avoid use-after-free in the global pointer variable



In case of usb_add_function() failure the error path has two issues:
 - the potentially allocated structure isn't getting freed
 - the global pointer variable is assigned to garbage

Fix the above mentioned issues by freeing memory and assigning NULL.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 0234609d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment