From 20842466ec6d823ae9d3991b86527b6a1460ec63 Mon Sep 17 00:00:00 2001 From: Christophe Ricard Date: Sun, 25 Jan 2015 23:33:23 +0100 Subject: NFC: st21nfcb: Avoid use of skb after free Do not insert in send queue the skb that contains unknown Packet Control Byte Acked-by: Christophe Ricard Signed-off-by: Anda-Maria Nicolae Signed-off-by: Samuel Ortiz --- drivers/nfc/st21nfcb/ndlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c index ef0f997dae0a..5fbf59d2138c 100644 --- a/drivers/nfc/st21nfcb/ndlc.c +++ b/drivers/nfc/st21nfcb/ndlc.c @@ -138,7 +138,7 @@ static void llt_ndlc_requeue_data_pending(struct llt_ndlc *ndlc) default: pr_err("UNKNOWN Packet Control Byte=%d\n", pcb); kfree_skb(skb); - break; + continue; } skb_queue_head(&ndlc->send_q, skb); } -- cgit v1.2.3