Skip to content

Commit

Permalink
scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
Browse files Browse the repository at this point in the history
map_storep was not being vfree()'d in the module_exit call.

Cc: <stable@vger.kernel.org>
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Ewan D. Milne authored and Martin K. Petersen committed Oct 27, 2016
1 parent 1e793f6 commit 4d2b496
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/scsi_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -5134,6 +5134,7 @@ static void __exit scsi_debug_exit(void)
bus_unregister(&pseudo_lld_bus);
root_device_unregister(pseudo_primary);

vfree(map_storep);
vfree(dif_storep);
vfree(fake_storep);
kfree(sdebug_q_arr);
Expand Down

0 comments on commit 4d2b496

Please sign in to comment.