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)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:03 +0000 (19:15 +0100)
commit3acdf8fba1b974c659fcc76fc09e81f57a1ea06d
treebf3162fec2a2598b2d369ce7fd333c271d16e825
parent3b300af62d85512d019b870d9450b093ddf1dcaf
tcm_fc: Do not free tpg structure during wq allocation failure

BugLink: http://bugs.launchpad.net/bugs/981162

commit 06383f10c49f507220594a455c6491ca6f8c94ab upstream.

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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/target/tcm_fc/tfc_conf.c