scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
authorEwan D. Milne <emilne@redhat.com>
Wed, 26 Oct 2016 15:22:53 +0000 (11:22 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 27 Oct 2016 02:14:50 +0000 (22:14 -0400)
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>
drivers/scsi/scsi_debug.c

index c905709707f0a2178ca82823fb2be8523e3abe96..cf04a364fd8b35f869c31e44491d237ae1b3bc6e 100644 (file)
@@ -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);