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

Barun Kumar Singh barun.singh at samsung.com
Fri May 13 10:44:31 UTC 2016


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;
-- 
1.9.1



More information about the pulseaudio-discuss mailing list