All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1]cciss: Fix free issue
@ 2011-08-28 13:54 taco
  0 siblings, 0 replies; only message in thread
From: taco @ 2011-08-28 13:54 UTC (permalink / raw)
  To: linux-scsi

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;
 }
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-28 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-28 13:54 [PATCH 1/1]cciss: Fix free issue taco

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.