2012-09-10 07:59:55

by Rymarkiewicz Waldemar

[permalink] [raw]
Subject: [PATCH] NFC: Unify kfree_skb call for received u frame

Signed-off-by: Waldemar Rymarkiewicz <[email protected]>
---
net/nfc/hci/shdlc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/nfc/hci/shdlc.c b/net/nfc/hci/shdlc.c
index dc8443a..fd75cec 100644
--- a/net/nfc/hci/shdlc.c
+++ b/net/nfc/hci/shdlc.c
@@ -398,8 +398,6 @@ static void nfc_shdlc_rcv_u_frame(struct nfc_shdlc *shdlc,
default:
break;
}
-
- kfree_skb(skb);
}

static void nfc_shdlc_handle_rcv_queue(struct nfc_shdlc *shdlc)
@@ -433,6 +431,7 @@ static void nfc_shdlc_handle_rcv_queue(struct nfc_shdlc *shdlc)
case SHDLC_CONTROL_HEAD_U:
u_frame_modifier = control & SHDLC_CONTROL_M_MASK;
nfc_shdlc_rcv_u_frame(shdlc, skb, u_frame_modifier);
+ kfree_skb(skb);
break;
default:
pr_err("UNKNOWN Control=%d\n", control);
--
1.7.10