[PATCH] Fixed memory leak in resampler.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux