]> git.tue.mpg.de Git - paraslash.git/commitdiff
para_filter: Call proper ->free_config method on shutdown.
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Nov 2012 09:14:39 +0000 (10:14 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 25 Nov 2012 13:08:55 +0000 (14:08 +0100)
Currently we just free the conf struct. For some filters this not
enough to deallocate all resources and therefore results in a memory
leak.  This leak is not serious though, since it does not affect
para_audiod, and para_filter is about to exit anyway at this point.

Fix it anyway.

filter.c

index 55b48ea257a99a618968bf79c91097e88ecf4dae..38122977f4bad9f0982fe30594e4f36c50c64176 100644 (file)
--- a/filter.c
+++ b/filter.c
@@ -162,7 +162,8 @@ out_cleanup:
                if (f->close)
                        f->close(fn);
                btr_remove_node(&fn->btrn);
-               free(fn->conf);
+               if (f->free_config)
+                       f->free_config(fn->conf);
                free(fn);
        }
        free(fns);