filter_chain(): Fix memory leak in parse_filter_args
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Feb 2007 22:47:57 +0000 (23:47 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 11 Feb 2007 22:47:57 +0000 (23:47 +0100)
Same bug as in parse_receiver_args(): argv must be freed (see previous patch).

filter_chain.c

index 8a41bed..285cfca 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);
        argv[0] = para_strdup(f->name);
        argc += 1;
        *conf = f->parse_config(argc, argv);
+       free(argv);
        return *conf? filter_num : -E_BAD_FILTER_OPTIONS;
 }
 
        return *conf? filter_num : -E_BAD_FILTER_OPTIONS;
 }