From 977a9d5473af8a13364c896eeb9ed83d55ce12e8 Mon Sep 17 00:00:00 2001 From: dequis Date: Wed, 9 Dec 2015 04:58:59 -0300 Subject: Revert "imc_away_send_update: Fix leak of away_states linked list" This reverts commit ed431c389887080dc4fa45e30d051ce733f4ce57. I'm going to let this leak. Turns out only purple allocates an empty list for every time this is called. Other protocols have statics, and they always return the same thing, can't free those. Whatever. The purple leak was insignificant, just more scratching of itches. --- protocols/nogaim.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'protocols/nogaim.c') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 0339feea..a5eda2e0 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -610,7 +610,6 @@ static char *imc_away_state_find(GList *gcm, char *away, char **message); int imc_away_send_update(struct im_connection *ic) { char *away, *msg = NULL; - GList *m = NULL; if (ic->acc->prpl->away_states == NULL || ic->acc->prpl->set_away == NULL) { @@ -620,7 +619,7 @@ int imc_away_send_update(struct im_connection *ic) away = set_getstr(&ic->acc->set, "away") ? : set_getstr(&ic->bee->set, "away"); if (away && *away) { - m = ic->acc->prpl->away_states(ic); + GList *m = ic->acc->prpl->away_states(ic); msg = ic->acc->flags & ACC_FLAG_AWAY_MESSAGE ? away : NULL; away = imc_away_state_find(m, away, &msg) ? : (imc_away_state_find(m, "away", &msg) ? : m->data); @@ -632,10 +631,6 @@ int imc_away_send_update(struct im_connection *ic) ic->acc->prpl->set_away(ic, away, msg); - while (m) { - m = g_list_delete_link(m, m); - } - return 1; } -- cgit v1.2.3