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

Commit 5017f3f0 authored by Maya Erez's avatar Maya Erez
Browse files

usb: gadget: Fix invalid pointer access in rndis_free_response



Fix code quality issues found by the automatic checking tool.
Verify that act is not NULL before accessing it in rndis_free_response.

CRs-Fixed: 566927
Change-Id: Id9c732669c64ef6f28e26ed660acb434bb1396a5
Signed-off-by: default avatarDanny Segal <dsegal@codeaurora.org>
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent c5b954d0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -995,6 +995,9 @@ void rndis_free_response(int configNr, u8 *buf)
	list_for_each_safe(act, tmp,
			&(rndis_per_dev_params[configNr].resp_queue))
	{
		if (!act)
			continue;

		r = list_entry(act, rndis_resp_t, list);
		if (r && r->buf == buf) {
			list_del(&r->list);