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

Commit 1d0ede93 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: gadget: f_midi: Fix use after free bug



Upon cable disconnect usb composition switches from midi
to default composition as a result midi function driver
frees the midi function. When cable is plugged back in
android_setup calls function setup call back for all the
function instances having non-null function pointer. This
results into access to already freed function pointer
stored in function instance. Fix this issue by setting
function instance's function pointer to NULL so that
android_setup will skip calling midi function setup upon
next cable connect.

Change-Id: Ia619650c94c35aea015a89841c59a1f9dbc521f9
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 773f15cd
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