Commit 9ff83977 authored by Andrew Morton's avatar Andrew Morton Committed by Christoph Hellwig

[PATCH] unchecked kmalloc in sr_audio_ioctl()

From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent e80f061d
......@@ -331,6 +331,9 @@ int sr_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, void *arg)
int result;
unsigned char *buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
if (!buffer)
return -ENOMEM;
memset(&cgc, 0, sizeof(struct cdrom_generic_command));
cgc.timeout = IOCTL_TIMEOUT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment