From 6967dcbb025280d33c9cd08502de7a5cdb051ae7 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 6 Mar 2021 09:49:34 -0400 Subject: [PATCH] lib/open: free GKeyFile This fixes a small-to-medium (depending on size of config file) memory leak. --- lib/open.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/open.cc b/lib/open.cc index b28b64e8..0c965d0d 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -375,6 +375,9 @@ notmuch_database_open_with_config (const char *database_path, DONE: talloc_free (local); + if (key_file) + g_key_file_free (key_file); + if (message) { if (status_string) *status_string = message; @@ -492,6 +495,9 @@ notmuch_database_create_with_config (const char *database_path, DONE: talloc_free (local); + if (key_file) + g_key_file_free (key_file); + if (message) { if (status_string) *status_string = message; -- 2.43.0