Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ca21002 authored by Christophe Ricard's avatar Christophe Ricard Committed by Samuel Ortiz
Browse files

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: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 6be88670
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -542,14 +542,12 @@ static int st21nfcb_hci_network_init(struct nci_dev *ndev)

	r = nci_hci_dev_session_init(ndev);
	if (r != NCI_HCI_ANY_OK)
		goto exit;
		goto free_dest_params;

	r = nci_nfcee_mode_set(ndev, ndev->hci_dev->conn_info->id,
			       NCI_NFCEE_ENABLE);
	if (r != NCI_STATUS_OK)
		goto exit;

	return 0;
		goto free_dest_params;

free_dest_params:
	kfree(dest_params);