From 58c45b30309a1dd255c8b9e5cb34398658867b81 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 13 Sep 2012 08:06:26 +0200 Subject: [PATCH] test/chmap: Fix wrong malloc size Signed-off-by: Takashi Iwai --- test/chmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.1