提交 021e2927 编写于 作者: Q Quentin Lambert 提交者: Martin K. Petersen

scsi: dpt_i2o: Add a missing call to kfree

Most error branches following the call to kzalloc contain a call to
kfree. This patch add these calls where they are missing.

This issue was found with Hector.
Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 b1509e5d
...@@ -1754,8 +1754,10 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg) ...@@ -1754,8 +1754,10 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
sg_offset = (msg[0]>>4)&0xf; sg_offset = (msg[0]>>4)&0xf;
msg[2] = 0x40000000; // IOCTL context msg[2] = 0x40000000; // IOCTL context
msg[3] = adpt_ioctl_to_context(pHba, reply); msg[3] = adpt_ioctl_to_context(pHba, reply);
if (msg[3] == (u32)-1) if (msg[3] == (u32)-1) {
kfree(reply);
return -EBUSY; return -EBUSY;
}
memset(sg_list,0, sizeof(sg_list[0])*pHba->sg_tablesize); memset(sg_list,0, sizeof(sg_list[0])*pHba->sg_tablesize);
if(sg_offset) { if(sg_offset) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册