提交 ad3f78b9 编写于 作者: K Kalle Valo

ath6kl: fix null skb dereference in ath6kl_rx()

smatch found that skb might be null in some cases in ath6kl_rx():

ath6kl/txrx.c +1252 ath6kl_rx(222) error: potential null derefence 'skb'.

This will happen when ath6kl is in AP mode and two clients send traffic
to each other.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 2e1cb23c
......@@ -1247,6 +1247,11 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
}
if (skb1)
ath6kl_data_tx(skb1, ar->net_dev);
if (skb == NULL) {
/* nothing to deliver up the stack */
return;
}
}
datap = (struct ethhdr *) skb->data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册