From: Ewan D. Milne Date: Wed, 26 Oct 2016 15:22:53 +0000 (-0400) Subject: scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded X-Git-Tag: v3.2.85~70 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=2171f0dc7707bcccd61c254dd60fc2aaa0b487bc 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 Reviewed-by: Laurence Oberman Signed-off-by: Martin K. Petersen [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index b3a729c90aa2..a9d1fea2ea0c 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -3474,6 +3474,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);