Re: [evolution-patches] Patches for leaks in evolution
- From: Kjartan Maraas <kmaraas broadpark no>
- To: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] Patches for leaks in evolution
- Date: Tue, 05 Jul 2005 15:14:33 +0200
tir, 05,.07.2005 kl. 15.12 +0200, skrev Kjartan Maraas:
> Hi.
>
> This is a set of leak fixes found by use of valgrind. Please review.
>
Well, if I had remembered to enter the ssh password after doing cvs diff
the file would probably have had content also :-)
Index: calendar/gui/calendar-config.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-config.c,v
retrieving revision 1.76
diff -u -p -r1.76 calendar-config.c
--- calendar/gui/calendar-config.c 17 Jun 2005 15:20:27 -0000 1.76
+++ calendar/gui/calendar-config.c 5 Jul 2005 13:10:58 -0000
@@ -195,9 +195,10 @@ calendar_config_get_icaltimezone (void)
calendar_config_init ();
location = calendar_config_get_timezone ();
- if (location)
+ if (location) {
zone = icaltimezone_get_builtin_timezone (location);
-
+ g_free (location);
+ }
if (!zone)
zone = icaltimezone_get_utc_timezone ();
Index: composer/e-msg-composer-select-file.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-select-file.c,v
retrieving revision 1.35
diff -u -p -r1.35 e-msg-composer-select-file.c
--- composer/e-msg-composer-select-file.c 3 Jun 2005 04:20:57 -0000 1.35
+++ composer/e-msg-composer-select-file.c 5 Jul 2005 13:10:58 -0000
@@ -194,8 +194,11 @@ select_attach_response(GtkWidget *select
char *path;
#ifdef USE_GTKFILECHOOSER
+ char *filename;
names = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (selector));
- path = g_path_get_dirname (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector)));
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector));
+ path = g_path_get_dirname (filename);
+ g_free (filename);
#else
char **files;
int i;
Index: composer/e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.512
diff -u -p -r1.512 e-msg-composer.c
--- composer/e-msg-composer.c 23 Jun 2005 09:11:06 -0000 1.512
+++ composer/e-msg-composer.c 5 Jul 2005 13:10:58 -0000
@@ -491,7 +491,7 @@ build_message (EMsgComposer *composer, g
}
/* FIXME: we may want to do better than this... */
- charset = best_charset (data, composer->charset, &plain_encoding);
+
type = camel_content_type_new ("text", "plain");
if ((charset = best_charset (data, composer->charset, &plain_encoding))) {
camel_content_type_set_param (type, "charset", charset);
Index: mail/em-mailer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.c,v
retrieving revision 1.30
diff -u -p -r1.30 em-mailer-prefs.c
--- mail/em-mailer-prefs.c 23 Jun 2005 09:11:06 -0000 1.30
+++ mail/em-mailer-prefs.c 5 Jul 2005 13:10:58 -0000
@@ -814,6 +814,7 @@ em_mailer_prefs_construct (EMMailerPrefs
font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/variable", NULL);
prefs->font_variable = GNOME_FONT_PICKER (glade_xml_get_widget (gui, "FontVariable"));
gnome_font_picker_set_font_name (prefs->font_variable, font);
+ g_free (font);
g_object_set_data ((GObject *) prefs->font_variable, "key", "/apps/evolution/mail/display/fonts/variable");
g_signal_connect (prefs->font_variable, "font-set", G_CALLBACK (font_changed), prefs);
if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/fonts/variable", NULL))
Index: mail/mail-config.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.c,v
retrieving revision 1.317
diff -u -p -r1.317 mail-config.c
--- mail/mail-config.c 23 Jun 2005 09:11:06 -0000 1.317
+++ mail/mail-config.c 5 Jul 2005 13:10:58 -0000
@@ -249,6 +249,7 @@ config_write_style (void)
gboolean custom;
char *fix_font;
char *var_font;
+ char *citation_color;
FILE *rc;
if (!(rc = fopen (config->gtkrc, "wt"))) {
@@ -259,7 +260,7 @@ config_write_style (void)
custom = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/fonts/use_custom", NULL);
var_font = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/fonts/variable", NULL);
fix_font = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
-
+ citation_color = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/citation_colour", NULL);
CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_red", red, (void)0, (int));
CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_green", green, (void)0, (int));
CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_blue", blue, (void)0, (int));
@@ -270,7 +271,8 @@ config_write_style (void)
if (gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/mark_citations", NULL))
fprintf (rc, " GtkHTML::cite_color = \"%s\"\n",
- gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/citation_colour", NULL));
+ citation_color);
+ g_free (citation_color);
if (custom && var_font && fix_font) {
fprintf (rc,
@@ -278,6 +280,9 @@ config_write_style (void)
" font_name = \"%s\"\n",
fix_font, var_font);
}
+ g_free (fix_font);
+ g_free (var_font);
+
fprintf (rc, "}\n\n");
fprintf (rc, "widget \"*.EMFolderView.*.GtkHTML\" style \"evolution-mail-custom-fonts\"\n");
Index: shell/e-shell-window.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-window.c,v
retrieving revision 1.34
diff -u -p -r1.34 e-shell-window.c
--- shell/e-shell-window.c 16 May 2005 04:46:40 -0000 1.34
+++ shell/e-shell-window.c 5 Jul 2005 13:10:58 -0000
@@ -670,6 +670,7 @@ setup_widgets (EShellWindow *window)
e_sidebar_set_mode (E_SIDEBAR (priv->sidebar), mode);
}
+ g_free (style);
/* The tool bar */
visible = gconf_client_get_bool (gconf_client,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]