Skip to content

Commit

Permalink
nfc: fix potential illegal memory access
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
albinyang authored and davem330 committed Jul 8, 2019
1 parent 4993e5b commit dd006fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/nfc/nci/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dd006fc

Please sign in to comment.