diff -r 481c7ea9e258 -r 93b27900416e src/protocols/icq/gaim_icq.c --- a/src/protocols/icq/gaim_icq.c Sat Dec 21 05:37:45 2002 +0000 +++ b/src/protocols/icq/gaim_icq.c Sat Dec 21 19:33:54 2002 +0000 @@ -397,33 +397,35 @@ static void icq_set_away(struct gaim_connection *gc, char *state, char *msg) { struct icq_data *id = (struct icq_data *)gc->proto_data; - if (gc->away) + if (gc->away) { + g_free(gc->away); gc->away = NULL; + } if (!strcmp(state, "Online")) icq_ChangeStatus(id->link, STATUS_ONLINE); else if (!strcmp(state, "Away")) { icq_ChangeStatus(id->link, STATUS_AWAY); - gc->away = ""; + gc->away = g_strdup(""); } else if (!strcmp(state, "Do Not Disturb")) { icq_ChangeStatus(id->link, STATUS_DND); - gc->away = ""; + gc->away = g_strdup(""); } else if (!strcmp(state, "Not Available")) { icq_ChangeStatus(id->link, STATUS_NA); - gc->away = ""; + gc->away = g_strdup(""); } else if (!strcmp(state, "Occupied")) { icq_ChangeStatus(id->link, STATUS_OCCUPIED); - gc->away = ""; + gc->away = g_strdup(""); } else if (!strcmp(state, "Free For Chat")) { icq_ChangeStatus(id->link, STATUS_FREE_CHAT); - gc->away = ""; + gc->away = g_strdup(""); } else if (!strcmp(state, "Invisible")) { icq_ChangeStatus(id->link, STATUS_INVISIBLE); - gc->away = ""; + gc->away = g_strdup(""); } else if (!strcmp(state, GAIM_AWAY_CUSTOM)) { if (msg) { icq_ChangeStatus(id->link, STATUS_NA); - gc->away = ""; + gc->away = g_strdup(""); } else { icq_ChangeStatus(id->link, STATUS_ONLINE); }