提交 c24a1710 编写于 作者: R Roland Dreier 提交者: James Bottomley

[SCSI] mpt2sas: Fix leak on mpt2sas_base_attach() error path

Commit 911ae943 ("[SCSI] mpt2sas: Added NUNA IO support in driver
which uses multi-reply queue support of the HBA") added new
allocations to the beginning of mpt2sas_base_attach(), which means
directly returning an error on failure of mpt2sas_base_map_resources()
will leak those allocations.

Fix this by doing "goto out_free_resources" in this place too, as the
rest of the function does.
Signed-off-by: NRoland Dreier <roland@purestorage.com>
Acked-by: N"Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 dab2f6b8
......@@ -4256,7 +4256,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
r = mpt2sas_base_map_resources(ioc);
if (r)
return r;
goto out_free_resources;
if (ioc->is_warpdrive) {
ioc->reply_post_host_index[0] =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册