summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Doliner <mark@kingant.net>2014-11-04 22:16:05 -0800
committerMark Doliner <mark@kingant.net>2014-11-04 22:16:05 -0800
commit39b4a888c94adfa0427ddd79d27d660d54cbd7b7 (patch)
treebfa180bc00e899d6161476746cd1465b929f3c4e
parent18d7e3ee9a74e3df40371774b08890f343595e99 (diff)
parent1e27e7634c31de14f67da4a756addcf7536db355 (diff)
downloadpidgin-39b4a888c94adfa0427ddd79d27d660d54cbd7b7.tar.gz
Merge heads of release-2.x.y branch. No overlapping files.
-rw-r--r--libpurple/pluginpref.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libpurple/pluginpref.c b/libpurple/pluginpref.c
index 61c0fc493f..6bb18eb0a0 100644
--- a/libpurple/pluginpref.c
+++ b/libpurple/pluginpref.c
@@ -142,10 +142,19 @@ purple_plugin_pref_new_with_name_and_label(const char *name, const char *label)
void
purple_plugin_pref_destroy(PurplePluginPref *pref)
{
+ GList *tmp;
g_return_if_fail(pref != NULL);
g_free(pref->name);
g_free(pref->label);
+ tmp = pref->choices;
+ while(tmp) {
+ g_free(tmp->data);
+ /* Remove the string, and the data entries */
+ tmp = g_list_delete_link(tmp, tmp);
+ tmp = g_list_delete_link(tmp, tmp);
+ }
+
g_list_free(pref->choices);
g_free(pref);
}
@@ -253,7 +262,7 @@ purple_plugin_pref_add_choice(PurplePluginPref *pref, const char *label, gpointe
g_return_if_fail(label != NULL);
g_return_if_fail(choice || purple_prefs_get_type(pref->name) == PURPLE_PREF_INT);
- pref->choices = g_list_append(pref->choices, (gpointer)label);
+ pref->choices = g_list_append(pref->choices, g_strdup(label));
pref->choices = g_list_append(pref->choices, choice);
}