[pulseaudio-discuss] [PATCH] filter-apply: Fixed memory leak.

KimJeongYeon see2002 at gmail.com
Fri Apr 7 14:28:22 UTC 2017


'fltr->name' should free prior to free 'fltr'.

Signed-off-by: KimJeongYeon <jeongyeon.kim at samsung.com>
---
 src/modules/module-filter-apply.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/modules/module-filter-apply.c b/src/modules/module-filter-apply.c
index f7e8734..e2a3ec8 100644
--- a/src/modules/module-filter-apply.c
+++ b/src/modules/module-filter-apply.c
@@ -514,7 +514,10 @@ static pa_hook_result_t process(struct userdata *u, pa_object *o, process_cmd_ty
 
 done:
     pa_xfree(module_name);
-    pa_xfree(fltr);
+    if (fltr) {
+        pa_xfree(fltr->name);
+        pa_xfree(fltr);
+    }
 
     return PA_HOOK_OK;
 }
-- 
2.7.4



More information about the pulseaudio-discuss mailing list