echo-cancel test program: fix memory leak

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

 



echo-cancel test program: fix memory leak
    
memory for pa_echo_canceller is allocated in init_common() a second time,
hence the allocated memory in main() is leaked

diff --git a/src/modules/echo-cancel/module-echo-cancel.c 
b/src/modules/echo-cancel/module-echo-cancel.c
index 1fad12a..8bf6670 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -2036,12 +2036,6 @@ int main(int argc, char* argv[]) {
         goto usage;
     }
 
-    u.ec = pa_xnew0(pa_echo_canceller, 1);
-    if (!u.ec) {
-        pa_log("Failed to alloc echo canceller");
-        goto fail;
-    }
-
     u.captured_file = fopen(argv[2], "r");
     if (u.captured_file == NULL) {
         perror ("fopen failed");

-- 

Peter Meerwald
+43-664-2444418 (mobile)


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

  Powered by Linux