tcm_fc: Do not free tpg structure during wq allocation failure
authorMark Rustad <mark.d.rustad@intel.com>
Tue, 3 Apr 2012 17:24:52 +0000 (10:24 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 7 Apr 2012 01:57:05 +0000 (18:57 -0700)
commit06383f10c49f507220594a455c6491ca6f8c94ab
treeaeed502673297971463114c1046e82c74ab498f2
parente1c4038282c7586c3544542b37872c434669d3ac
tcm_fc: Do not free tpg structure during wq allocation failure

Avoid freeing a registered tpg structure if an alloc_workqueue call
fails.  This fixes a bug where the failure was leaking memory associated
with se_portal_group setup during the original core_tpg_register() call.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Acked-by: Kiran Patil <Kiran.patil@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/tcm_fc/tfc_conf.c