1
0
Fork 0

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>
alistair/sunxi64-5.4-dsi
Yang Wei 2019-07-08 22:57:39 +08:00 committed by David S. Miller
parent 4993e5b37e
commit dd006fc434
1 changed files with 1 additions and 1 deletions

View File

@ -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);