diff options
author | Ewan D. Milne <emilne@redhat.com> | 2016-10-26 18:22:53 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-02-23 06:54:22 +0300 |
commit | 58bcbdf5b617129e476d883d4ddb69516b6ad19d (patch) | |
tree | d715d644b2f792869b1d99bd8770a70fcf15c558 | |
parent | ed3c533a3b67cfd13a82ed26b2344d3aa3a15a3a (diff) | |
download | linux-58bcbdf5b617129e476d883d4ddb69516b6ad19d.tar.xz |
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>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/scsi/scsi_debug.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 1328a2621070..e9e43f7de656 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -3478,6 +3478,7 @@ static void __exit scsi_debug_exit(void) bus_unregister(&pseudo_lld_bus); root_device_unregister(pseudo_primary); + vfree(map_storep); if (dif_storep) vfree(dif_storep); |