diff options
| author | Julien Lefrique <lefrique@marvell.com> | 2014-10-21 10:52:50 -0400 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-11-28 08:07:51 -0500 |
| commit | 966efbfb0dc06bc90131ea41aa4be67c0d22853d (patch) | |
| tree | 748d8af3ff5f6800aeed9b98a848f63ef382e89c | |
| parent | 122c195872e963c83f3a61dcab0937247b56786e (diff) | |
NFC: Fix a memory leak
Signed-off-by: Julien Lefrique <lefrique@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| -rw-r--r-- | net/nfc/llcp_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index 51e788797317..b18f07ccb504 100644 --- a/net/nfc/llcp_core.c +++ b/net/nfc/llcp_core.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2011 Intel Corporation. All rights reserved. | 2 | * Copyright (C) 2011 Intel Corporation. All rights reserved. |
| 3 | * Copyright (C) 2014 Marvell International Ltd. | ||
| 3 | * | 4 | * |
| 4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by | 6 | * 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 | struct nfc_llcp_local *local; | 1512 | struct nfc_llcp_local *local; |
| 1512 | 1513 | ||
| 1513 | local = nfc_llcp_find_local(dev); | 1514 | local = nfc_llcp_find_local(dev); |
| 1514 | if (local == NULL) | 1515 | if (local == NULL) { |
| 1516 | kfree_skb(skb); | ||
| 1515 | return -ENODEV; | 1517 | return -ENODEV; |
| 1518 | } | ||
| 1516 | 1519 | ||
| 1517 | __nfc_llcp_recv(local, skb); | 1520 | __nfc_llcp_recv(local, skb); |
| 1518 | 1521 | ||
