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

Commit b7de69a2 authored by Sridhar Ancha's avatar Sridhar Ancha
Browse files

msm: ipa: Fix to memory leak when sending non-linear data



In cases where source ep or dest ep is not valid, descriptor
memory allocated for frag skb's is not freed. Make a change
to free the memory in such error cases.

Change-Id: Ie15c48ae1bb34e304795607a09c753360eb015ec
Acked-by: default avatarChaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: default avatarSridhar Ancha <sancha@codeaurora.org>
parent ce015ce1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1587,14 +1587,14 @@ int ipa2_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
		if (-1 == src_ep_idx) {
			IPAERR("Client %u is not mapped\n",
				IPA_CLIENT_APPS_LAN_WAN_PROD);
			return -EFAULT;
			goto fail_gen;
		}
		dst_ep_idx = ipa2_get_ep_mapping(dst);
	} else {
		src_ep_idx = ipa2_get_ep_mapping(dst);
		if (-1 == src_ep_idx) {
			IPAERR("Client %u is not mapped\n", dst);
			return -EFAULT;
			goto fail_gen;
		}
		if (meta && meta->pkt_init_dst_ep_valid)
			dst_ep_idx = meta->pkt_init_dst_ep;