commit | 6dcda097ace32f57b0e2d82a2037bd9648d01bc1 | [log] [tgz] |
---|---|---|
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | Thu Dec 03 17:32:04 2020 +0200 |
committer | Marek Vasut <marex@denx.de> | Sun Jan 31 14:08:56 2021 +0100 |
tree | cfe5c0a83df3f556b5daf67909e44512fd667eca | |
parent | 6f767edc673ec9a8e84e4533094f58b87f54c859 [diff] |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>