filter_chain.c, recv_common.c: Fix another memory leak
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Feb 2007 23:18:14 +0000 (00:18 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 11 Feb 2007 23:18:14 +0000 (00:18 +0100)
There was still one leak left: argv[0] gets strdupped, but never freed.

NEWS
filter_chain.c
recv_common.c

diff --git a/NEWS b/NEWS
index 40dd534..0c26cd9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ Minor improvements, more documentation and a bunch of bug fixes.
          of audio data not being written under certain circumstances
        - audiod: compute the difference of server time and local time
          correctly
+       - para_server/para_audiod: Fix some memory leaks
        - documentation improvements
        - configure.ac: fix checks for para_krell
        - new man pages
index 285cfca..ee94e8f 100644 (file)
@@ -222,6 +222,7 @@ static int parse_filter_args(int filter_num, char *options, void **conf)
        argv[0] = para_strdup(f->name);
        argc += 1;
        *conf = f->parse_config(argc, argv);
+       free(argv[0]);
        free(argv);
        return *conf? filter_num : -E_BAD_FILTER_OPTIONS;
 }
index c14455d..aad0af0 100644 (file)
@@ -51,6 +51,7 @@ static void *parse_receiver_args(int receiver_num, char *options)
                argv[1] = NULL;
        }
        conf = r->parse_config(argc, argv);
+       free(argv[0]);
        free(argv);
        return conf;
 }