Commit 966efbfb authored by Julien Lefrique's avatar Julien Lefrique Committed by Samuel Ortiz

NFC: Fix a memory leak

Signed-off-by: default avatarJulien Lefrique <lefrique@marvell.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 122c1958
/* /*
* Copyright (C) 2011 Intel Corporation. All rights reserved. * Copyright (C) 2011 Intel Corporation. All rights reserved.
* Copyright (C) 2014 Marvell International Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -1511,8 +1512,10 @@ int nfc_llcp_data_received(struct nfc_dev *dev, struct sk_buff *skb) ...@@ -1511,8 +1512,10 @@ int nfc_llcp_data_received(struct nfc_dev *dev, struct sk_buff *skb)
struct nfc_llcp_local *local; struct nfc_llcp_local *local;
local = nfc_llcp_find_local(dev); local = nfc_llcp_find_local(dev);
if (local == NULL) if (local == NULL) {
kfree_skb(skb);
return -ENODEV; return -ENODEV;
}
__nfc_llcp_recv(local, skb); __nfc_llcp_recv(local, skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment