resampler: Fix leaking lfe filter on init failure
authorBarun Kumar Singh <barun.singh@samsung.com>
Fri, 13 May 2016 10:44:31 +0000 (16:14 +0530)
committerArun Raghavan <arun@arunraghavan.net>
Fri, 27 May 2016 04:07:37 +0000 (09:37 +0530)
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>
src/pulsecore/resampler.c

index b683b05..ea22cd2 100644 (file)
@@ -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;