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:
Родитель
ce83a4ca18
Коммит
3ff448b5b7
|
@ -851,6 +851,8 @@ bfad_im_module_exit(void)
|
||||||
|
|
||||||
if (bfad_im_scsi_vport_transport_template)
|
if (bfad_im_scsi_vport_transport_template)
|
||||||
fc_release_transport(bfad_im_scsi_vport_transport_template);
|
fc_release_transport(bfad_im_scsi_vport_transport_template);
|
||||||
|
|
||||||
|
idr_destroy(&bfad_im_port_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Загрузка…
Ссылка в новой задаче