summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-09-13 08:06:26 +0200
committerTakashi Iwai <tiwai@suse.de>2012-09-13 08:24:59 +0200
commit58c45b30309a1dd255c8b9e5cb34398658867b81 (patch)
tree138d0e990309a60cb1055039702f10b0b30f2bbb
parent2c61a4173ff2c3d57eb77b3f66e0d0e517c799d6 (diff)
downloadalsa-lib-58c45b30309a1dd255c8b9e5cb34398658867b81.tar.gz
test/chmap: Fix wrong malloc size
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--test/chmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/chmap.c b/test/chmap.c
index a566b1cf..d73ae736 100644
--- a/test/chmap.c
+++ b/test/chmap.c
@@ -118,7 +118,7 @@ static int set_chmap(snd_pcm_t *pcm, int format, int channels, int rate,
}
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;