changeset 26693:46b1d6eca6ef

Avoid dereferencing unitialized memory or leaking PidginThemeFonts
author Paul Aurich <paul@darkrain42.org>
date Sun, 26 Apr 2009 06:26:55 +0000
parents 81559f83e993
children 83e6e710cbf3
files pidgin/gtkblist-theme-loader.c
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist-theme-loader.c	Sun Apr 26 06:22:50 2009 +0000
+++ b/pidgin/gtkblist-theme-loader.c	Sun Apr 26 06:26:55 2009 +0000
@@ -81,6 +81,17 @@
 		{NULL, NULL}
 	};
 
+	expanded          = NULL;
+	collapsed         = NULL;
+	contact           = NULL;
+	online            = NULL;
+	away              = NULL;
+	offline           = NULL;
+	idle              = NULL;
+	message           = NULL;
+	message_nick_said = NULL;
+	status            = NULL;
+
 	/* Find the theme file */
 	g_return_val_if_fail(dir != NULL, NULL);
 	filename_full = g_build_filename(dir, "theme.xml", NULL);
@@ -184,6 +195,10 @@
 			pidgin_theme_font_free(*lookups[i].font);
 		}
 	}
+
+	pidgin_theme_font_free(expanded);
+	pidgin_theme_font_free(collapsed);
+
 	xmlnode_free(root_node);
 	g_free(data);