From da157e978d73f1947bb77637c324e19d003366d4 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 29 Jul 2021 14:51:55 +0200 Subject: [PATCH] a52: fix the double free for rec->slave and rec The function snd_pcm_ioplug_delete() calls the close ops callback already, thus exit more early in the error path. Fixes: https://github.com/alsa-project/alsa-plugins/issues/31 Signed-off-by: Jaroslav Kysela --- a52/pcm_a52.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c index 28dbd93..289a9db 100644 --- a/a52/pcm_a52.c +++ b/a52/pcm_a52.c @@ -1179,7 +1179,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(a52) if ((err = a52_set_hw_constraint(rec)) < 0) { snd_pcm_ioplug_delete(&rec->io); - goto error; + return err; } *pcmp = rec->io.pcm; -- 2.47.1