summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Wei <albin_yang@163.com>2019-07-08 22:57:39 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-28 08:28:30 +0200
commite1f7bc510d84532d3140da37830e9a84e5984e65 (patch)
tree5c9654fe44e9031eea0244af5e6dfa7200357991
parent5edaba9e9e06b9c310eeec995ca7320c2dc64f2b (diff)
downloadlinux-stable-e1f7bc510d84532d3140da37830e9a84e5984e65.tar.gz
linux-stable-e1f7bc510d84532d3140da37830e9a84e5984e65.tar.bz2
linux-stable-e1f7bc510d84532d3140da37830e9a84e5984e65.zip
nfc: fix potential illegal memory access
[ Upstream commit dd006fc434e107ef90f7de0db9907cbc1c521645 ] The frags_q is not properly initialized, it may result in illegal memory access when conn_info is NULL. The "goto free_exit" should be replaced by "goto exit". Signed-off-by: Yang Wei <albin_yang@163.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/nfc/nci/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
index 908f25e3773e..5405d073804c 100644
--- a/net/nfc/nci/data.c
+++ b/net/nfc/nci/data.c
@@ -119,7 +119,7 @@ static int nci_queue_tx_data_frags(struct nci_dev *ndev,
conn_info = nci_get_conn_info_by_conn_id(ndev, conn_id);
if (!conn_info) {
rc = -EPROTO;
- goto free_exit;
+ goto exit;
}
__skb_queue_head_init(&frags_q);