diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2010-07-16 15:37:40 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 16:48:53 +0200 |
commit | d23948ea38c4c6aa13e4df903dfdd71cabd0e6a3 (patch) | |
tree | 854461f6c1fe78c2586ae47d5e4af08dd0434d6c /drivers/s390 | |
parent | [SCSI] zfcp: Post events through FC transport class (diff) | |
download | linux-d23948ea38c4c6aa13e4df903dfdd71cabd0e6a3.tar.xz linux-d23948ea38c4c6aa13e4df903dfdd71cabd0e6a3.zip |
[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: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 075852f6968c..a08d33a96ec9 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c @@ -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; |