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

Skip to content
Commit adce509c authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: gadget: f_cdev: Fix NULL pointer dereference in cser_free_inst



If f_cdev_alloc() fails it frees the port context and set_inst_name()
call back returns with error. As a result free_func_inst() call back
is called which is dereferencing port context from f_cdev_opts context
which results into NULL ptr dereference. Fix the issue by adding NULL
check for port context pointer in f_cdev_opts context.

Change-Id: I69828761be0a9f7df714eec34894c13f762dcc43
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 75a9d0fe
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