From 2a0afe074b6f15c0253c124d7da50f8eb4552e71 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Fri, 14 Sep 2018 14:21:04 -0700 Subject: [PATCH] Free queries and alias_queries before exiting. --- main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index cdfe4d47..a84b8bcf 100644 --- a/main.c +++ b/main.c @@ -868,10 +868,15 @@ int main (int argc, char **argv, char **environ) { for (; optind < argc; optind++) queries = mutt_add_list (queries, argv[optind]); - return mutt_query_variables (queries); + exit_code = mutt_query_variables (queries); + mutt_free_list (&queries); + goto cleanup_and_exit; } if (dump_variables) - return mutt_dump_variables(); + { + exit_code = mutt_dump_variables(); + goto cleanup_and_exit; + } if (alias_queries) { @@ -894,6 +899,7 @@ int main (int argc, char **argv, char **environ) printf ("%s\n", alias_queries->data); } } + mutt_free_list (&alias_queries); goto cleanup_and_exit; } -- 2.40.0