Fix memory leak in audioc.c.
[paraslash.git] / audioc.c
index 52c2bd3..1baa6c3 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (C) 2005-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2012 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -298,7 +298,9 @@ int main(int argc, char *argv[])
                        .check_required = 0,
                        .check_ambiguity = 0
                };
                        .check_required = 0,
                        .check_ambiguity = 0
                };
-               if (audioc_cmdline_parser_config_file(cf, &conf, &params)) {
+               ret = audioc_cmdline_parser_config_file(cf, &conf, &params);
+               free(cf);
+               if (ret) {
                        fprintf(stderr, "parse error in config file\n");
                        exit(EXIT_FAILURE);
                }
                        fprintf(stderr, "parse error in config file\n");
                        exit(EXIT_FAILURE);
                }