NFC: nci: memory leak in nci_core_conn_create()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 23 Dec 2015 22:45:27 +0000 (23:45 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 29 Dec 2015 18:06:23 +0000 (19:06 +0100)
commitc6dc65d885b98898bf287aaf44e020077b41769f
tree94d8c0d3eaecb7589469b9dc6066445c2a1b57ab
parent97b69788971de8af994ba570d56c455e79eaf35e
NFC: nci: memory leak in nci_core_conn_create()

I've moved the check for "number_destination_params" forward
a few lines to avoid leaking "cmd".

Fixes: caa575a86ec1 ('NFC: nci: fix possible crash in nci_core_conn_create')

Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/nci/core.c