src/pcm/pcm_multi.c: add missing free
PATCH 4/4 src/pcm/pcm_multi.c: add missing free
From: Julia Lawall <[email protected]>
Something that is allocated using calloc is not freed on an error path.
Signed-off-by Julia Lawall <[email protected]>
Signed-off-by Suman Saha <[email protected]>
---
Compile-tested only.
src/pcm/pcm_multi.c | 2 ++ 1 file changed, 2 insertions(+)
src/pcm/pcm_multi.c +2 -0
@@ -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; }