Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55e7b4fb authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d34602de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);