We just need to free j not nr_cmds if kmalloc for cmd_sg_list failed. diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 8f4ef65..7b729ca 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -321,7 +321,7 @@ static SGDescriptor_struct **cciss_allocate_sg_chain_blocks( } return cmd_sg_list; clean: - cciss_free_sg_chain_blocks(cmd_sg_list, nr_cmds); + cciss_free_sg_chain_blocks(cmd_sg_list, j); return NULL; } -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html