Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
55e7b4fb d34602de

+1 -1
+1 -1
drivers/staging/rts5139/rts51x_fop.c
··· 79 79 80 80 case 1: 81 81 /* Read from card */ 82 - buf = kmalloc(cmnd->buf_len, GFP_KERNEL); 82 + buf = kzalloc(cmnd->buf_len, GFP_KERNEL); 83 83 if (!buf) 84 84 TRACE_RET(chip, STATUS_NOMEM); 85 85