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 <christophe-h.ricard@st.com>
Signed-off-by: Anda-Maria Nicolae <anda-maria.nicolae@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Christophe Ricard 2015-01-25 23:33:23 +01:00 committed by Samuel Ortiz
parent a968639bca
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);
}