Browse Source

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>
Dan Carpenter 12 years ago
parent
commit
55e7b4fbd4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/rts5139/rts51x_fop.c

+ 1 - 1
drivers/staging/rts5139/rts51x_fop.c

@@ -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);