diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-09-13 08:06:26 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-13 08:24:59 +0200 |
commit | 58c45b30309a1dd255c8b9e5cb34398658867b81 (patch) | |
tree | 138d0e990309a60cb1055039702f10b0b30f2bbb | |
parent | 2c61a4173ff2c3d57eb77b3f66e0d0e517c799d6 (diff) | |
download | alsa-lib-58c45b30309a1dd255c8b9e5cb34398658867b81.tar.gz |
test/chmap: Fix wrong malloc size
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | test/chmap.c | 2 |
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; |