]> git.notmuchmail.org Git - notmuch/commitdiff
lib/open: free GKeyFile
authorDavid Bremner <david@tethera.net>
Sat, 6 Mar 2021 13:49:34 +0000 (09:49 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 13 Mar 2021 13:02:36 +0000 (09:02 -0400)
This fixes a small-to-medium (depending on size of config file) memory
leak.

lib/open.cc

index b28b64e8c1dc4c82253c8d4e8705f6ada8369b1d..0c965d0d70cc900c865c0e52f820a386b6199774 100644 (file)
@@ -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;