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>
This commit is contained in:
parent
d34602de3b
commit
55e7b4fbd4
|
@ -79,7 +79,7 @@ static int rts51x_sd_direct_cmnd(struct rts51x_chip *chip,
|
|||
|
||||
case 1:
|
||||
/* Read from card */
|
||||
buf = kmalloc(cmnd->buf_len, GFP_KERNEL);
|
||||
buf = kzalloc(cmnd->buf_len, GFP_KERNEL);
|
||||
if (!buf)
|
||||
TRACE_RET(chip, STATUS_NOMEM);
|
||||
|
||||
|
|
Loading…
Reference in New Issue