Skip to content

Commit

Permalink
staging: rts5139: use kzalloc() to close an info leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Sep 26, 2012
1 parent d34602d commit 55e7b4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rts5139/rts51x_fop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 55e7b4f

Please sign in to comment.