[pulseaudio-discuss] [PATCH] echo-cancel: Fix error cleanup of pa_speex_ec_init()
Peter Meerwald
pmeerw at pmeerw.net
Fri Jan 11 06:59:27 PST 2013
From: Peter Meerwald <p.meerwald at bct-electronic.com>
Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>
---
src/modules/echo-cancel/speex.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/modules/echo-cancel/speex.c b/src/modules/echo-cancel/speex.c
index 5ebd0b3..6c532f2 100644
--- a/src/modules/echo-cancel/speex.c
+++ b/src/modules/echo-cancel/speex.c
@@ -199,8 +199,14 @@ pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
fail:
if (ma)
pa_modargs_free(ma);
- if (ec->params.priv.speex.state)
+ if (ec->params.priv.speex.pp_state) {
speex_preprocess_state_destroy(ec->params.priv.speex.pp_state);
+ ec->params.priv.speex.pp_state = NULL;
+ }
+ if (ec->params.priv.speex.state) {
+ speex_echo_state_destroy(ec->params.priv.speex.state);
+ ec->params.priv.speex.state = NULL;
+ }
return FALSE;
}
--
1.7.9.5
More information about the pulseaudio-discuss
mailing list