resampler: Fix leaking lfe filter on init failure

Fix memory leak in pa_resampler_new() in resampler.c, Deallocating
memory of r->lfe_filter in case of fail.

Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
This commit is contained in:
Barun Kumar Singh 2016-05-13 16:14:31 +05:30 committed by Arun Raghavan
parent adbaae77d6
commit 1d5dfccbb2

View file

@ -431,6 +431,8 @@ pa_resampler* pa_resampler_new(
return r; return r;
fail: fail:
if (r->lfe_filter)
pa_lfe_filter_free(r->lfe_filter);
pa_xfree(r); pa_xfree(r);
return NULL; return NULL;