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 <[email protected]>
Signed-off-by: Anda-Maria Nicolae <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
Christophe Ricard 2015-01-25 23:33:23 +01:00 • committed by Samuel Ortiz
commit 20842466ec

View file

@ -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);
}