[PATCH] drivers/scsi/scsi_debug.c: add missing vfrees

From: Julia Lawall
Date: Sun Apr 29 2012 - 16:15:39 EST


From: Julia Lawall <Julia.Lawall@xxxxxxx>

Free dif_storep and fake_storep on failure as done in nearby error-handling
code.

Signed-off-by: Julia Lawall <Julia.Lawall@xxxxxxx>

---
drivers/scsi/scsi_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 182d5a5..16e44f8 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -3393,7 +3393,8 @@ static int __init scsi_debug_init(void)
printk(KERN_ERR
"%s: ERR: unmap_granularity < unmap_alignment\n",
__func__);
- return -EINVAL;
+ ret = -EINVAL;
+ goto free_vm;
}

map_size = (sdebug_store_sectors / scsi_debug_unmap_granularity);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/