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>
This commit is contained in:
Alexey Khoroshilov 2015-06-12 01:50:45 +03:00 коммит произвёл James Bottomley
Родитель ce83a4ca18
Коммит 3ff448b5b7
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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