diff options
author | Yang Wei <albin_yang@163.com> | 2019-07-08 22:57:39 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-08 12:46:24 -0700 |
commit | dd006fc434e107ef90f7de0db9907cbc1c521645 (patch) | |
tree | 446fcb0957343e58317af0748cd79f9b7bcf7fb4 /net/nfc/nci | |
parent | 4993e5b37e8bcb55ac90f76eb6d2432647273747 (diff) | |
download | linux-dd006fc434e107ef90f7de0db9907cbc1c521645.tar.bz2 |
nfc: fix potential illegal memory access
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>
Diffstat (limited to 'net/nfc/nci')
-rw-r--r-- | net/nfc/nci/data.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c index 0a0c265baaa4..ce3382be937f 100644 --- a/net/nfc/nci/data.c +++ b/net/nfc/nci/data.c @@ -107,7 +107,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); |