]> git.baikalelectronics.ru Git - kernel.git/commit
qla2xxx: Don't leak commands we give up on in qlt_do_work()
authorRoland Dreier <roland@purestorage.com>
Tue, 12 Jun 2012 01:23:16 +0000 (18:23 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 13 Jun 2012 03:12:26 +0000 (20:12 -0700)
commit32d79886c9a5a2f0bf37df93bae6e7526e1125d3
tree3fc7f7eecc6620f5b8aa2ad2a5e9d50aa9a1be12
parent64ed8b69f176e0656d2bb701f1c10c49ee595ca4
qla2xxx: Don't leak commands we give up on in qlt_do_work()

If we go to the "out_term:" exit path in qlt_do_work(), we call
qlt_send_term_exchange() with a NULL cmd, which means that it can't
possibly free the cmd for us.  Add an explicit call to free the
command memory, so we don't leak the allocation.

This will also fix warnings about "BUG qla_tgt_cmd_cachep: Objects
remaining on kmem_cache_close" from slub when unloading the qla2xxx
target module.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/qla2xxx/qla_target.c