Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ff448b5 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by James Bottomley
Browse files

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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent ce83a4ca
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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