]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7c3baeaef6313ac6d2a4bea7bc8379065cafaca1
tree94d8c0d3eaecb7589469b9dc6066445c2a1b57ab
parentc474f318e721187a402c7f3fac3cc124f476caac
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: 143cd1cd05a9 ('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