Skip to contentSkip to conversation

cciss: Fix free issue

PATCH New taco 1 participant 1 message Aug 28, 2011

Subsystems (2)
lore
Share & tools
lore

taco

author
#0 lore raw

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
index 8f4ef65..7b729ca 100644
@@ -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;
 }