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

Commit 7506dd8c authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: gadget: u_ether: Add NULL check in helper APIs



APIs being called as part of configfs attributes require
to have NULL check for network device pointer. As user
can call show and store call back even if network device
is not allocated which results in to NULL pointer dereference.

For example: In non-NCM composition user tries
cat config/usb_gadget/g1/functions/ncm.0/ifname

Change-Id: Ia4a1c6bec6d20e41886c952b0365419f2a8effcb
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 0a57938d
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