[pulseaudio-discuss] echo-cancel test program: fix memory leak
Peter Meerwald
pmeerw at pmeerw.net
Mon Nov 28 07:14:16 PST 2011
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)
More information about the pulseaudio-discuss
mailing list