[alsa-devel] [PATCH 4/4] src/pcm/pcm_multi.c: add missing free
18 Sep
2011
18 Sep
'11
10:04 p.m.
From: Julia Lawall julia@diku.dk
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
--- Compile-tested only.
src/pcm/pcm_multi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/pcm/pcm_multi.c b/src/pcm/pcm_multi.c index 68f2d68..6b39c7a 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; }
4845
Age (days ago)
4845
Last active (days ago)
0 comments
1 participants
participants (1)
-
Julia Lawall