summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEwan D. Milne <emilne@redhat.com>2016-10-26 11:22:53 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-10-26 22:14:50 -0400
commit4d2b496f19f3c2cfaca1e8fa0710688b5ff3811d (patch)
tree732fdb9b77cc3746a60e0fa5eee80b423f88dc38
parent1e793f6fc0db920400574211c48f9157a37e3945 (diff)
downloadlinux-4d2b496f19f3c2cfaca1e8fa0710688b5ff3811d.tar.bz2
scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
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>
-rw-r--r--drivers/scsi/scsi_debug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index c905709707f0..cf04a364fd8b 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -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);