Mercurial > pidgin.yaz
changeset 27149:01c91af62ab3
Plug a leak from changing this to use jabber_get_bare_jid instead of normalize.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 07 Jun 2009 06:19:12 +0000 |
parents | 8ab2309dfd68 |
children | faed0a042558 |
files | libpurple/protocols/jabber/buddy.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c Sun Jun 07 01:21:36 2009 +0000 +++ b/libpurple/protocols/jabber/buddy.c Sun Jun 07 06:19:12 2009 +0000 @@ -69,7 +69,7 @@ gboolean create) { JabberBuddy *jb; - const char *realname; + char *realname; if (js->buddies == NULL) return NULL; @@ -81,8 +81,9 @@ if(!jb && create) { jb = g_new0(JabberBuddy, 1); - g_hash_table_insert(js->buddies, g_strdup(realname), jb); - } + g_hash_table_insert(js->buddies, realname, jb); + } else + g_free(realname); return jb; }