sbp-target: fix error path in sbp_make_tpg()
authorChris Boot <bootc@bootc.net>
Tue, 11 Dec 2012 21:58:48 +0000 (21:58 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 13 Dec 2012 05:17:25 +0000 (21:17 -0800)
If the TPG memory is allocated successfully, but we fail further along
in the function, a dangling pointer to freed memory is left in the TPort
structure. This is mostly harmless, but does prevent re-trying the
operation without first removing the TPort altogether.

Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Chris Boot <bootc@bootc.net>
Cc: Andy Grover <agrover@redhat.com>
Cc: Nicholas A. Bellinger <nab@linux-iscsi.org>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

No differences found