From: Julia Lawall Date: Sun, 18 Sep 2011 20:04:37 +0000 (+0200) Subject: src/pcm/pcm_multi.c: add missing free X-Git-Tag: v1.0.25~12 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=c36f8c87ffb978d8cabbc4e5c489f14b6b276365;p=alsa-lib.git 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 Signed-off-by: Suman Saha Signed-off-by: Takashi Iwai --- diff --git a/src/pcm/pcm_multi.c b/src/pcm/pcm_multi.c index 68f2d688..6b39c7a1 100644 --- a/src/pcm/pcm_multi.c +++ b/src/pcm/pcm_multi.c @@ -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; }