提交 b8d5d5ff 编写于 作者: V Vasanthakumar Thiagarajan 提交者: Kalle Valo

ath6kl: Fix htc_packet leak in ath6kl_htc_rx_fetch()

It is found during the code review. As the leak would happen only
in failure case, the imapct is not easily visible.
Signed-off-by: NVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 4159cc93
......@@ -1715,12 +1715,10 @@ static int ath6kl_htc_rx_fetch(struct htc_target *target,
packet = list_first_entry(rx_pktq, struct htc_packet,
list);
list_del(&packet->list);
/* fully synchronous */
packet->completion = NULL;
if (!list_empty(rx_pktq))
if (!list_is_singular(rx_pktq))
/*
* look_aheads in all packet
* except the last one in the
......@@ -1735,7 +1733,7 @@ static int ath6kl_htc_rx_fetch(struct htc_target *target,
if (status)
return status;
list_add_tail(&packet->list, comp_pktq);
list_move_tail(&packet->list, comp_pktq);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册