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>
Tue, 29 Oct 2013 23:20:28 +0000 (16:20 -0700)
commit4bff7208f332b2b1d7cf1338e50527441283a198
tree76e3cfbd5ac1e042a9c2b5f54d33d7c9a5ac8238
parent9ae113ce5faf1c74af1ee71b5ef7d04b6b06b063
mei: nfc: fix memory leak in error path

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: <stable@vger.kernel.org> # 3.10+
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