diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2015-06-12 00:50:45 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-08-12 20:31:28 +0200 |
commit | 3ff448b5b7dc7ad4d664588c343da1e5e2ce18dd (patch) | |
tree | d525b35d767c8f5a3307be983b29f3f81b9ac0c3 /drivers/scsi/bfa | |
parent | libfc: Fix a typo in a source code comment (diff) | |
download | linux-3ff448b5b7dc7ad4d664588c343da1e5e2ce18dd.tar.xz linux-3ff448b5b7dc7ad4d664588c343da1e5e2ce18dd.zip |
bfa: fix leak of bfad_im_port_index on module unload
Resources allocated within bfad_im_port_index idr are not deallocated
on module unload. The patch adds idr_destroy() in exit function.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r-- | drivers/scsi/bfa/bfad_im.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 7223b0006740..8367c11d554b 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -851,6 +851,8 @@ bfad_im_module_exit(void) if (bfad_im_scsi_vport_transport_template) fc_release_transport(bfad_im_scsi_vport_transport_template); + + idr_destroy(&bfad_im_port_index); } void |