Mercurial > pidgin
changeset 32186:3e27c95ab8e6
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.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 19 Sep 2011 20:23:13 +0000 |
parents | f857a6db3bd9 |
children | a56483e407d4 |
files | pidgin/gtkconv-theme.c pidgin/gtkconv-theme.h |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv-theme.c Mon Sep 19 18:51:53 2011 +0000 +++ b/pidgin/gtkconv-theme.c Mon Sep 19 20:23:13 2011 +0000 @@ -553,12 +553,12 @@ } 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 *
--- a/pidgin/gtkconv-theme.h Mon Sep 19 18:51:53 2011 +0000 +++ b/pidgin/gtkconv-theme.h Mon Sep 19 20:23:13 2011 +0000 @@ -72,7 +72,7 @@ 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);