Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 67a1b84a authored by Pratham Pratap's avatar Pratham Pratap
Browse files

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: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent a20716bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment