From 36ea0df4e02cd27e76d8e28a3a47729aa5e146a8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 20 Apr 2002 01:18:56 +0000 Subject: Free some temporary path buffers. 2002-04-19 Jeffrey Stedfast * mail-config.c (config_read_signature): Free some temporary path buffers. svn path=/trunk/; revision=16545 --- mail/ChangeLog | 3 +++ mail/mail-config.c | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 392b75c810..b1b6ad4adf 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,8 @@ 2002-04-19 Jeffrey Stedfast + * mail-config.c (config_read_signature): Free some temporary path + buffers. + * mail-display.c (stream_write_or_redisplay_when_loaded): Ref the html object here, this is an async handler so it's possible for our caller (or someone else) to unref the html object before we diff --git a/mail/mail-config.c b/mail/mail-config.c index f874e56814..3cb1dc9636 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -382,10 +382,10 @@ static MailConfigSignature * config_read_signature (gint i) { MailConfigSignature *sig; - gchar *path, *val; - + char *path, *val; + sig = g_new0 (MailConfigSignature, 1); - + sig->id = i; path = g_strdup_printf ("/Mail/Signatures/name_%d", i); @@ -395,7 +395,7 @@ config_read_signature (gint i) sig->name = val; else g_free (val); - + path = g_strdup_printf ("/Mail/Signatures/filename_%d", i); val = bonobo_config_get_string (config->db, path, NULL); g_free (path); @@ -403,7 +403,7 @@ config_read_signature (gint i) sig->filename = val; else g_free (val); - + path = g_strdup_printf ("/Mail/Signatures/script_%d", i); val = bonobo_config_get_string (config->db, path, NULL); g_free (path); @@ -411,13 +411,15 @@ config_read_signature (gint i) sig->script = val; else g_free (val); - + path = g_strdup_printf ("/Mail/Signatures/random_%d", i); sig->random = bonobo_config_get_boolean_with_default (config->db, path, FALSE, NULL); - + g_free (path); + path = g_strdup_printf ("/Mail/Signatures/html_%d", i); sig->html = bonobo_config_get_boolean_with_default (config->db, path, FALSE, NULL); - + g_free (path); + return sig; } -- cgit v1.2.3