usb: f_fs: Free descriptors in func_unbind
Commit 2df1806a ("usb: f_fs: Avoid use-after-free of ffs_data") added an early return from the ffs_func_unbind if refcount becomes zero without actually freeing the descriptors and the eps. Now during next connect, func_bind fails as the eps are not marked NULL. Fix this by removing the early return and adding a judgement for refcount to avoid ffs_data pointer use-after-free. Change-Id: I95648335bd14ab65909c9598eca3bf72a1cc8d5e Signed-off-by:Pratham Pratap <prathampratap@codeaurora.org>
Loading
Please register or sign in to comment