]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 24 Nov 2016 15:23:30 +0000 (16:23 +0100)
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: Jiri Slaby <jslaby@suse.cz>
drivers/scsi/scsi_debug.c

index 01c0ffa31276296a985d1381d53e1fc7ac069e80..39f2d7d138cfb6dc15323ff8119eb4df297444ab 100644 (file)
@@ -3502,6 +3502,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);