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

Skip to content
Commit e311404f authored by Saket Saurabh's avatar Saket Saurabh
Browse files

usb: gadget: u_ether: Fix NULL pointer dereference in process_tx_w()



Current code checks if dev->port_usb is NULL, then reference to usb_ep
'in' is set to NULL and 'in' is passed as NULL in usb_ep_free_request()
If 'in' is passed as NULL in usb_ep_free_request() it would dereference
NULL pointer causing the crash.

Fix the issue by using port_usb_active flag which is set to false if
dev->port_usb is NULL. Instead of checking 'in' as NULL, check for
port_usb_active false condition before calling usb_ep_free_request().

Change-Id: I9b46c4f35dad5f80f71bcfd10ace0994817ea365
Signed-off-by: default avatarSaket Saurabh <ssaurabh@codeaurora.org>
parent 3fd4f55f
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