ALSA: isa: not allocating enough space
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Nov 2013 07:58:38 +0000 (10:58 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 13 Nov 2013 08:28:31 +0000 (09:28 +0100)
We allocate only 4 bytes here "sizeof(int)" instead of WF_MSAMPLE_BYTES
(259) which was intended.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/isa/wavefront/wavefront_synth.c

index a2f87f9488ee163e336350c3c1b7cdebb48dca24..e5db001363eee9376d23e79f8a94483f62cd42d1 100644 (file)
@@ -1196,7 +1196,7 @@ wavefront_send_multisample (snd_wavefront_t *dev, wavefront_patch_info *header)
        int num_samples;
        unsigned char *msample_hdr;
 
-       msample_hdr = kmalloc(sizeof(WF_MSAMPLE_BYTES), GFP_KERNEL);
+       msample_hdr = kmalloc(WF_MSAMPLE_BYTES, GFP_KERNEL);
        if (! msample_hdr)
                return -ENOMEM;