summaryrefslogtreecommitdiff
path: root/net/nfc
diff options
context:
space:
mode:
authorYang Wei <albin_yang@163.com>2019-07-08 17:57:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-04 10:34:54 +0300
commit7c8f2c52a72105b03618542a715e41112afab22c (patch)
tree8339c136c5f834ccee5af9774cd576a4090b7bf0 /net/nfc
parent2289103cd17a6f1d9bdecfdb6e2445e042b94fe7 (diff)
downloadlinux-7c8f2c52a72105b03618542a715e41112afab22c.tar.xz
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>
Diffstat (limited to 'net/nfc')
-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 dbd24254412a..d20383779710 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);