提交 d23948ea 编写于 作者: S Swen Schillig 提交者: James Bottomley

[SCSI] zfcp: Prevent access on uninitialized memory.

Initialize allocated memory to zero to prevent access on error. This
prevents a possible error in the error handling path.
Signed-off-by: NSwen Schillig <swen@vnet.ibm.com>
Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 2d1e547f
......@@ -1005,7 +1005,7 @@ int zfcp_dbf_adapter_register(struct zfcp_adapter *adapter)
char dbf_name[DEBUG_MAX_NAME_LEN];
struct zfcp_dbf *dbf;
dbf = kmalloc(sizeof(struct zfcp_dbf), GFP_KERNEL);
dbf = kzalloc(sizeof(struct zfcp_dbf), GFP_KERNEL);
if (!dbf)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册