[pulseaudio-discuss] [PATCH] echo-cancel: Fix error cleanup of pa_speex_ec_init()

Tanu Kaskinen tanuk at iki.fi
Fri Jan 11 11:25:27 PST 2013


On Fri, 2013-01-11 at 15:59 +0100, Peter Meerwald wrote:
> 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;
>  }

Thanks, applied.

-- 
Tanu



More information about the pulseaudio-discuss mailing list