# HG changeset patch # User Stu Tomlinson # Date 1130322726 0 # Node ID f91b4fedd8b58d1e3630d081c9696439790b6efa # Parent 047f85200139fcbbeacf23aaeeb4656dca8c90e2 [gaim-migrate @ 14132] The first thing bonjour_dns_sd_send_status() does is free data->status, so passing it a pointer to that as the new status is stupid. This leaked too. committer: Tailor Script diff -r 047f85200139 -r f91b4fedd8b5 src/protocols/bonjour/bonjour.c --- a/src/protocols/bonjour/bonjour.c Wed Oct 26 08:35:12 2005 +0000 +++ b/src/protocols/bonjour/bonjour.c Wed Oct 26 10:32:06 2005 +0000 @@ -181,7 +181,7 @@ GaimStatusType *type; int primitive; GaimPresence *presence; - const char *message; + const char *message, *bonjour_status; gc = gaim_account_get_connection(account); bd = gc->proto_data; @@ -206,13 +206,13 @@ * Each of them can have an optional message. */ if (gaim_presence_is_available(presence)) - bd->dns_sd_data->status = g_strdup("avail"); + bonjour_status = "avail"; else if (gaim_presence_is_idle(presence)) - bd->dns_sd_data->status = g_strdup("away"); + bonjour_status = "away"; else - bd->dns_sd_data->status = g_strdup("dnd"); + bonjour_status = "dnd"; - bonjour_dns_sd_send_status(bd->dns_sd_data, bd->dns_sd_data->status, message); + bonjour_dns_sd_send_status(bd->dns_sd_data, bonjour_status, message); } static GList *