pidgin: d29e854d: Remove unnecessary function. It's also a...

qulogic at pidgin.im qulogic at pidgin.im
Thu Sep 8 22:01:04 EDT 2011


----------------------------------------------------------------------
Revision: d29e854dab88bd851aa115aee8dde3fd56f4b61a
Parent:   8eecb8c39a2664ad42716d06cb5675afbe77da3e
Author:   qulogic at pidgin.im
Date:     09/08/11 18:10:49
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d29e854dab88bd851aa115aee8dde3fd56f4b61a

Changelog: 

Remove unnecessary function. It's also a use-after-free.

Changes against parent 8eecb8c39a2664ad42716d06cb5675afbe77da3e

  patched  pidgin/plugins/adiumthemes/message-style.c

-------------- next part --------------
============================================================
--- pidgin/plugins/adiumthemes/message-style.c	946c46be8c5ae196cbbf52794acae500bb391bcb
+++ pidgin/plugins/adiumthemes/message-style.c	a4b1dcf7b8fa4488ba7bfd730de6c1b5048f5075
@@ -49,43 +49,6 @@ pidgin_message_style_new(const char *sty
 	return ret;
 }
 
-/**
- * deallocate any memory used for info.plist options
- */
-static void
-pidgin_message_style_unset_info_plist(PidginMessageStyle *style)
-{
-	style->message_view_version = 0;
-	g_free(style->cf_bundle_name);
-	style->cf_bundle_name = NULL;
-
-	g_free(style->cf_bundle_identifier);
-	style->cf_bundle_identifier = NULL;
-
-	g_free(style->cf_bundle_get_info_string);
-	style->cf_bundle_get_info_string = NULL;
-
-	g_free(style->default_font_family);
-	style->default_font_family = NULL;
-
-	style->default_font_size = 0;
-	style->shows_user_icons = TRUE;
-	style->disable_combine_consecutive = FALSE;
-	style->default_background_is_transparent = FALSE;
-	style->disable_custom_background = FALSE;
-
-	g_free(style->default_background_color);
-	style->default_background_color = NULL;
-
-	style->allow_text_colors = TRUE;
-
-	g_free(style->image_mask);
-	style->image_mask = NULL;
-	g_free(style->default_variant);
-	style->default_variant = NULL;
-}
-
-
 void
 pidgin_message_style_unref(PidginMessageStyle *style)
 {
@@ -97,6 +60,14 @@ pidgin_message_style_unref(PidginMessage
 	if (style->ref_counter)
 		return;
 
+	g_free(style->cf_bundle_name);
+	g_free(style->cf_bundle_identifier);
+	g_free(style->cf_bundle_get_info_string);
+	g_free(style->default_font_family);
+	g_free(style->default_background_color);
+	g_free(style->image_mask);
+	g_free(style->default_variant);
+
 	g_free(style->style_dir);
 	g_free(style->template_path);
 
@@ -108,8 +79,6 @@ pidgin_message_style_unref(PidginMessage
 	g_free(style->basestyle_css);
 
 	g_free(style);
-
-	pidgin_message_style_unset_info_plist(style);
 }
 
 void


More information about the Commits mailing list