aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-03-31 02:02:14 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2015-04-05 17:54:55 -0400
commit2ca21002798a1a88196a90f407b80df3a25c69dc (patch)
tree4d471bf3d59542f186ba55d62724065c8bec7ec7 /drivers/nfc
parent6be88670fc59d50426f90f734a36b90e1de7d148 (diff)
NFC: st21nfcb: Fix memory leak in secure element probing stage
In case the hci session is successfully initialized we never release the nci_core_conn_create dest_params. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfcb/st21nfcb_se.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/nfc/st21nfcb/st21nfcb_se.c b/drivers/nfc/st21nfcb/st21nfcb_se.c
index 7c82e9d87a65..455b9c2b833d 100644
--- a/drivers/nfc/st21nfcb/st21nfcb_se.c
+++ b/drivers/nfc/st21nfcb/st21nfcb_se.c
@@ -542,14 +542,12 @@ static int st21nfcb_hci_network_init(struct nci_dev *ndev)
542 542
543 r = nci_hci_dev_session_init(ndev); 543 r = nci_hci_dev_session_init(ndev);
544 if (r != NCI_HCI_ANY_OK) 544 if (r != NCI_HCI_ANY_OK)
545 goto exit; 545 goto free_dest_params;
546 546
547 r = nci_nfcee_mode_set(ndev, ndev->hci_dev->conn_info->id, 547 r = nci_nfcee_mode_set(ndev, ndev->hci_dev->conn_info->id,
548 NCI_NFCEE_ENABLE); 548 NCI_NFCEE_ENABLE);
549 if (r != NCI_STATUS_OK) 549 if (r != NCI_STATUS_OK)
550 goto exit; 550 goto free_dest_params;
551
552 return 0;
553 551
554free_dest_params: 552free_dest_params:
555 kfree(dest_params); 553 kfree(dest_params);