# HG changeset patch # User Sadrul Habib Chowdhury # Date 1276813313 0 # Node ID c4cbe5f992cec48f364449e02a56ab045fcd2d5b # Parent 545ce15b619f5bb2f6b2470dd4e3b54a22e5cfeb Initialize pointer, fix a typo to fix a crash. diff -r 545ce15b619f -r c4cbe5f992ce libpurple/protocols/yahoo/libymsg.c --- a/libpurple/protocols/yahoo/libymsg.c Thu Jun 17 21:23:01 2010 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Thu Jun 17 22:21:53 2010 +0000 @@ -402,10 +402,10 @@ PurpleGroup *g; GSList *list, *i; gboolean onlist = FALSE; - char *oname; + char *oname = NULL; if (g_hash_table_lookup_extended(ht, purple_normalize(account, name), (gpointer *)&oname, (gpointer *)&list)) - g_hash_table_steal(ht, oname); + g_hash_table_steal(ht, name); else list = purple_find_buddies(account, name); @@ -841,15 +841,14 @@ default: break; } - + if (*stat == '1') serv_got_typing(gc, fed_from, 0, PURPLE_TYPING); else serv_got_typing_stopped(gc, fed_from); - + if (fed_from != from) g_free(fed_from); - } else if (!g_ascii_strncasecmp(msg, "GAME", strlen("GAME"))) { PurpleBuddy *bud = purple_find_buddy(account, from); @@ -1012,7 +1011,6 @@ break; } purple_debug_info("yahoo", "Message from federated (%d) buddy %s.\n", im->fed, im->fed_from); - } /* peer session id */ if (im && (pair->key == 11)) {