[PATCH] filter-apply: Fixed memory leak.

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

 



'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



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

  Powered by Linux