]> git.baikalelectronics.ru Git - kernel.git/commit
qla2xxx: Fix scsi_host leak on qlt_lport_register callback failure
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 15 Jan 2014 04:39:56 +0000 (20:39 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 19 Jan 2014 02:22:09 +0000 (02:22 +0000)
commitc472cb9ce5155ca2a4defc73158f56fb203acb16
treeb4a1ed21015abc8ccb80e2ce2316a14828dd7b1a
parentd3742c672dc7f8f9d9bfe9c77f6036c915fcaefa
qla2xxx: Fix scsi_host leak on qlt_lport_register callback failure

This patch fixes a possible scsi_host reference leak in qlt_lport_register(),
when a non zero return from the passed (*callback) does not call drop the
local reference via scsi_host_put() before returning.

This currently does not effect existing tcm_qla2xxx code as the passed callback
will never fail, but fix this up regardless for future code.

Cc: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/qla2xxx/qla_target.c