changeset 32595:6c814cf24b04

Remove unnecessary function. It's also a use-after-free.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 08 Sep 2011 22:10:49 +0000
parents 8e1ec44ede75
children 66876919c094
files pidgin/plugins/adiumthemes/message-style.c
diffstat 1 files changed, 8 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/adiumthemes/message-style.c	Thu Sep 08 22:04:35 2011 +0000
+++ b/pidgin/plugins/adiumthemes/message-style.c	Thu Sep 08 22:10:49 2011 +0000
@@ -49,43 +49,6 @@
 	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 @@
 	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 @@
 	g_free(style->basestyle_css);
 
 	g_free(style);
-
-	pidgin_message_style_unset_info_plist(style);
 }
 
 void