cciss: Fix free issue
Subsystems (2)
PATCH 1/1 cciss: Fix free issue
We just need to free j not nr_cmds if kmalloc for cmd_sg_list failed.
drivers/block/cciss.c +1 -1
@@ -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 ; }