提交 66a67936 编写于 作者: K Kashyap, Desai 提交者: James Bottomley

[SCSI] mpt2sas: Check for NULL pointer before free_pages is added.

Added check before free_pages just to make sure ioc->scsi_lookup is not NULL.
Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 ef7c80c1
......@@ -1919,7 +1919,10 @@ _base_release_memory_pools(struct MPT2SAS_ADAPTER *ioc)
ioc->config_page, ioc->config_page_dma);
}
free_pages((ulong)ioc->scsi_lookup, ioc->scsi_lookup_pages);
if (ioc->scsi_lookup) {
free_pages((ulong)ioc->scsi_lookup, ioc->scsi_lookup_pages);
ioc->scsi_lookup = NULL;
}
kfree(ioc->hpr_lookup);
kfree(ioc->internal_lookup);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册