diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-09-23 12:31:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-26 12:19:50 -0400 |
commit | 55e7b4fbd47a510b6c8ca53eaf7d9dff816cd26c (patch) | |
tree | a431fa3d13f4234ce3243daae617e84688a91684 | |
parent | d34602de3ba29b3ceafe4e15e27a25c6a5bccc38 (diff) |
staging: rts5139: use kzalloc() to close an info leak
If we don't fill the whole buffer then there is information leaked to
the user.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rts5139/rts51x_fop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rts5139/rts51x_fop.c b/drivers/staging/rts5139/rts51x_fop.c index e1200fe89579..bf1a9e64e874 100644 --- a/drivers/staging/rts5139/rts51x_fop.c +++ b/drivers/staging/rts5139/rts51x_fop.c | |||
@@ -79,7 +79,7 @@ static int rts51x_sd_direct_cmnd(struct rts51x_chip *chip, | |||
79 | 79 | ||
80 | case 1: | 80 | case 1: |
81 | /* Read from card */ | 81 | /* Read from card */ |
82 | buf = kmalloc(cmnd->buf_len, GFP_KERNEL); | 82 | buf = kzalloc(cmnd->buf_len, GFP_KERNEL); |
83 | if (!buf) | 83 | if (!buf) |
84 | TRACE_RET(chip, STATUS_NOMEM); | 84 | TRACE_RET(chip, STATUS_NOMEM); |
85 | 85 | ||