22 lines
631 B
Diff
22 lines
631 B
Diff
|
From 58c45b30309a1dd255c8b9e5cb34398658867b81 Mon Sep 17 00:00:00 2001
|
||
|
From: Takashi Iwai <tiwai@suse.de>
|
||
|
Date: Thu, 13 Sep 2012 08:06:26 +0200
|
||
|
Subject: [PATCH 22/30] test/chmap: Fix wrong malloc size
|
||
|
|
||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||
|
---
|
||
|
test/chmap.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
--- a/test/chmap.c
|
||
|
+++ b/test/chmap.c
|
||
|
@@ -118,7 +118,7 @@ static int set_chmap(snd_pcm_t *pcm, int
|
||
|
}
|
||
|
if (setup_pcm(pcm, format, channels, rate))
|
||
|
return 1;
|
||
|
- map = malloc(sizeof(int) * channels + 1);
|
||
|
+ map = malloc(sizeof(int) * (channels + 1));
|
||
|
if (!map) {
|
||
|
printf("cannot malloc\n");
|
||
|
return 1;
|