echo-cancel: Close debug files on module unload
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 10 Oct 2011 16:47:55 +0000 (22:17 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 10 Oct 2011 16:48:22 +0000 (22:18 +0530)
src/modules/echo-cancel/module-echo-cancel.c

index b17e18f..b1fa791 100644 (file)
@@ -1773,6 +1773,15 @@ void pa__done(pa_module*m) {
     if (u->asyncmsgq)
         pa_asyncmsgq_unref(u->asyncmsgq);
 
+    if (u->save_aec) {
+        if (u->played_file)
+            fclose(u->played_file);
+        if (u->captured_file)
+            fclose(u->captured_file);
+        if (u->canceled_file)
+            fclose(u->canceled_file);
+    }
+
     pa_xfree(u);
 }