mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-19 05:33:43 -04:00
test/chmap: Fix wrong malloc size
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2c61a4173f
commit
58c45b3030
1 changed files with 1 additions and 1 deletions
|
|
@ -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))
|
if (setup_pcm(pcm, format, channels, rate))
|
||||||
return 1;
|
return 1;
|
||||||
map = malloc(sizeof(int) * channels + 1);
|
map = malloc(sizeof(int) * (channels + 1));
|
||||||
if (!map) {
|
if (!map) {
|
||||||
printf("cannot malloc\n");
|
printf("cannot malloc\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue