[PATCH 1/1]cciss: Fix free issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux