pidgin: aafe2ed3: Fix a leak. pidgin_conversation_theme_ad...

qulogic at pidgin.im qulogic at pidgin.im
Mon Sep 19 17:21:05 EDT 2011


----------------------------------------------------------------------
Revision: aafe2ed344156a9efa972ab4be19b743144c3f1f
Parent:   28344d83587ee1f03891921f68f93c0163d25cff
Author:   qulogic at pidgin.im
Date:     09/19/11 16:23:13
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/aafe2ed344156a9efa972ab4be19b743144c3f1f

Changelog: 

Fix a leak. pidgin_conversation_theme_add_variant should only be
used by the theme builder, so it's fine if we let it take
ownership of the variant name string.

Changes against parent 28344d83587ee1f03891921f68f93c0163d25cff

  patched  pidgin/gtkconv-theme.c
  patched  pidgin/gtkconv-theme.h

-------------- next part --------------
============================================================
--- pidgin/gtkconv-theme.c	8c4a327bfcf9273067a286557250d276d39919ce
+++ pidgin/gtkconv-theme.c	b4c57f34fcdf0e066c59fd4159e5c976e0e9597e
@@ -553,12 +553,12 @@ void
 }
 
 void
-pidgin_conversation_theme_add_variant(PidginConvTheme *theme, const char *variant)
+pidgin_conversation_theme_add_variant(PidginConvTheme *theme, char *variant)
 {
 	PidginConvThemePrivate *priv;
 	priv = PIDGIN_CONV_THEME_GET_PRIVATE(theme);
 
-	priv->variants = g_list_prepend(priv->variants, g_strdup(variant));
+	priv->variants = g_list_prepend(priv->variants, variant);
 }
 
 const char *
============================================================
--- pidgin/gtkconv-theme.h	651dd2931040c2d569dfc35475443249f54e7a8b
+++ pidgin/gtkconv-theme.h	885fdfd73934177b963097984e7d12b3551ea837
@@ -72,7 +72,7 @@ void pidgin_conversation_theme_set_info(
 const GHashTable *pidgin_conversation_theme_get_info(const PidginConvTheme *theme);
 void pidgin_conversation_theme_set_info(PidginConvTheme *theme, GHashTable *info);
 
-void pidgin_conversation_theme_add_variant(PidginConvTheme *theme, const char *variant);
+void pidgin_conversation_theme_add_variant(PidginConvTheme *theme, char *variant);
 const char *pidgin_conversation_theme_get_variant(PidginConvTheme *theme);
 void pidgin_conversation_theme_set_variant(PidginConvTheme *theme, const char *variant);
 const GList *pidgin_conversation_theme_get_variants(PidginConvTheme *theme);


More information about the Commits mailing list