mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
src/pcm/pcm_multi.c: add missing free
Something that is allocated using calloc is not freed on an error path. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Suman Saha <sumsaha@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
03aa1a57c9
commit
c36f8c87ff
1 changed files with 2 additions and 0 deletions
|
|
@ -886,6 +886,8 @@ int snd_pcm_multi_open(snd_pcm_t **pcmp, const char *name,
|
|||
err = snd_pcm_new(&pcm, SND_PCM_TYPE_MULTI, name, stream,
|
||||
multi->slaves[0].pcm->mode);
|
||||
if (err < 0) {
|
||||
free(multi->slaves);
|
||||
free(multi->channels);
|
||||
free(multi);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue