Mercurial > pidgin.yaz
changeset 31979:c832d481d021
jabber: Tighter scoping
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 03 May 2011 05:03:41 +0000 |
parents | b2f6fec7b98e |
children | 92f3d821653f |
files | libpurple/protocols/jabber/presence.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c Tue May 03 05:02:00 2011 +0000 +++ b/libpurple/protocols/jabber/presence.c Tue May 03 05:03:41 2011 +0000 @@ -1210,12 +1210,12 @@ parse_vcard_avatar(JabberStream *js, JabberPresence *presence, xmlnode *x) { xmlnode *photo = xmlnode_get_child(x, "photo"); - char *hash_tmp; if (photo) { - g_free(presence->vcard_avatar_hash); + char *hash_tmp = xmlnode_get_data(photo); hash_tmp = xmlnode_get_data(photo); - presence->vcard_avatar_hash = + g_free(presence->vcard_avatar_hash); + presence->vcard_avatar_hash = hash_tmp ? hash_tmp : g_strdup(""); } }