소스 검색

ath9k_htc: Fix memory leak

SKBs that are allocated in the HTC layer do not have callbacks
registered and hence ended up not being freed, Fix this by freeing
them properly in the TX completion routine.

Cc: <stable@vger.kernel.org>
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan 13 년 전
부모
커밋
0981c3b24e
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      drivers/net/wireless/ath/ath9k/htc_hst.c

+ 2 - 0
drivers/net/wireless/ath/ath9k/htc_hst.c

@@ -344,6 +344,8 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,
 			endpoint->ep_callbacks.tx(endpoint->ep_callbacks.priv,
 			endpoint->ep_callbacks.tx(endpoint->ep_callbacks.priv,
 						  skb, htc_hdr->endpoint_id,
 						  skb, htc_hdr->endpoint_id,
 						  txok);
 						  txok);
+		} else {
+			kfree_skb(skb);
 		}
 		}
 	}
 	}