pidgin: 83592c61: Avoid dereferencing unitialized memory o...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sun Apr 26 13:05:53 EDT 2009


-----------------------------------------------------------------
Revision: 83592c610006db8f5109ca540344521661236cad
Ancestor: eba0ea9b81623f69d9dc43018e805da28f3968d0
Author: darkrain42 at pidgin.im
Date: 2009-04-26T06:26:55
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/83592c610006db8f5109ca540344521661236cad

Modified files:
        pidgin/gtkblist-theme-loader.c

ChangeLog: 

Avoid dereferencing unitialized memory or leaking PidginThemeFonts

-------------- next part --------------
============================================================
--- pidgin/gtkblist-theme-loader.c	79f1278fd93bbb79eea31726552c16aa25b6a3c5
+++ pidgin/gtkblist-theme-loader.c	5641a47495bb7b54f8470c66c2605d5bcddcf44b
@@ -81,6 +81,17 @@ pidgin_blist_loader_build(const gchar *d
 		{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_blist_loader_build(const gchar *d
 			pidgin_theme_font_free(*lookups[i].font);
 		}
 	}
+
+	pidgin_theme_font_free(expanded);
+	pidgin_theme_font_free(collapsed);
+
 	xmlnode_free(root_node);
 	g_free(data);
 


More information about the Commits mailing list