aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-config.c
diff options
context:
space:
mode:
authorGravatar Holger Freyther <zecke@selfish.org>2009-11-21 22:45:23 +0100
committerGravatar Carl Worth <cworth@cworth.org>2009-11-22 00:14:48 +0100
commit6c7ec294bbe5ae4c3e1498b5061103f08076e016 (patch)
treea95eb2231926f430be9ec77f4131fcd18a243ac4 /notmuch-config.c
parentb5d763200046b50656c96ac126f8db4054ff3440 (diff)
notmuch-config: Fix memleaks.
While talloc is great we need to free the g_error by hand. Tested-by: Stefan Schmidt <stefan@datenfreihafen.org> Signed-off-by: Holger Freyther <zecke@selfish.org>
Diffstat (limited to 'notmuch-config.c')
-rw-r--r--notmuch-config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/notmuch-config.c b/notmuch-config.c
index 7252a191..aaa0372c 100644
--- a/notmuch-config.c
+++ b/notmuch-config.c
@@ -207,9 +207,11 @@ notmuch_config_open (void *ctx,
fprintf (stderr, "Error reading configuration file %s: %s\n",
config->filename, error->message);
talloc_free (config);
+ g_error_free (error);
return NULL;
}
+ g_error_free (error);
is_new = 1;
}
@@ -308,6 +310,7 @@ notmuch_config_save (notmuch_config_t *config)
if (! g_file_set_contents (config->filename, data, length, &error)) {
fprintf (stderr, "Error saving configuration to %s: %s\n",
config->filename, error->message);
+ g_error_free (error);
return 1;
}