summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEwan D. Milne <emilne@redhat.com>2016-10-26 11:22:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-10 16:38:53 +0100
commit2a1a0a6f1d60d3cfc5a30783927794c168b8c0fd (patch)
tree5a47772341d9a2b7ad205c1b06ac4ed864848488
parent5bac49422b4a73bbc2733ba504b32bac76808bfb (diff)
scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
commit 4d2b496f19f3c2cfaca1e8fa0710688b5ff3811d upstream. map_storep was not being vfree()'d in the module_exit call. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 6a219a0844d3..05e892a231a5 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);