mei: nfc: fix memory leak in error path
authorTomas Winkler <tomas.winkler@intel.com>
Mon, 21 Oct 2013 19:05:38 +0000 (22:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2013 19:28:09 +0000 (11:28 -0800)
commita58c56c06df7d78317fb330a1677e93c46566de9
tree4142d55ed0b448bfdfe8b66d04eb8e1d31273ed7
parent9dae4dbe6ef3f804250d3751018c5e2ea01f6f8f
mei: nfc: fix memory leak in error path

commit 4bff7208f332b2b1d7cf1338e50527441283a198 upstream.

The flow may reach the err label without freeing cl and cl_info

cl and cl_info weren't assigned to ndev->cl and cl_info
so they weren't freed in mei_nfc_free called on error path

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/nfc.c