aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-01-25 17:33:23 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2015-01-26 17:14:33 -0500
commit20842466ec6d823ae9d3991b86527b6a1460ec63 (patch)
tree8f4d228c436cf4642b87ebb7268022cc78a562e8 /drivers/nfc
parenta968639bcaa7bb8fcd9a74b2c4995d754be313db (diff)
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>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfcb/ndlc.c2
1 files changed, 1 insertions, 1 deletions
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)
138 default: 138 default:
139 pr_err("UNKNOWN Packet Control Byte=%d\n", pcb); 139 pr_err("UNKNOWN Packet Control Byte=%d\n", pcb);
140 kfree_skb(skb); 140 kfree_skb(skb);
141 break; 141 continue;
142 } 142 }
143 skb_queue_head(&ndlc->send_q, skb); 143 skb_queue_head(&ndlc->send_q, skb);
144 } 144 }