staging: rts5139: use kzalloc() to close an info leak
authorDan Carpenter <dan.carpenter@oracle.com>
Sun, 23 Sep 2012 16:31:30 +0000 (19:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2012 16:19:50 +0000 (09:19 -0700)
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>
drivers/staging/rts5139/rts51x_fop.c

index e1200fe89579a606a8d7cc6d2f06ce3bdae2bb14..bf1a9e64e8744f5d5b648407ba46173b5b74502d 100644 (file)
@@ -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);