[PATCH] Fixed memory leak in resampler.c

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

 



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



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

  Powered by Linux