[pulseaudio-discuss] [PATCH] Fixed memory leak in resampler.c

Arun Raghavan arun at arunraghavan.net
Fri May 27 04:09:05 UTC 2016


On Fri, 13 May 2016, at 04:14 PM, Barun Kumar Singh wrote:
> pulsecore: Fix memory leak in pa_resampler_new() in resampler.c,
> Deallocating memory of r->lfe_filter 
> in case of fail.
> ---
>  src/pulsecore/resampler.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
> index b683b05..038ac6f 100644
> --- a/src/pulsecore/resampler.c
> +++ b/src/pulsecore/resampler.c
> @@ -431,6 +431,8 @@ pa_resampler* pa_resampler_new(
>      return r;
>  
>  fail:
> +    if(r->lfe_filter)
> +      pa_lfe_filter_free(r->lfe_filter);
>      pa_xfree(r);
>  
>      return NULL;
> -- 

Pushed with a bunch of small changes, thanks!

For future submissions, please take a look at the differences in what I
pushed and what you submitted. These are quite minor, but will go a long
way in reducing the effort involved in merging your patches.

-- Arun


More information about the pulseaudio-discuss mailing list