Skip to content

Commit 7c8f2c5

Browse files
albinyanggregkh
authored andcommitted
nfc: fix potential illegal memory access
[ Upstream commit dd006fc ] 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>
1 parent 2289103 commit 7c8f2c5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/nfc/nci/data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static int nci_queue_tx_data_frags(struct nci_dev *ndev,
119119
conn_info = nci_get_conn_info_by_conn_id(ndev, conn_id);
120120
if (!conn_info) {
121121
rc = -EPROTO;
122-
goto free_exit;
122+
goto exit;
123123
}
124124

125125
__skb_queue_head_init(&frags_q);

0 commit comments

Comments
 (0)