pidgin: 592b4775: Plug a leak from changing this to use ja...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Sun Jun 7 02:25:42 EDT 2009
-----------------------------------------------------------------
Revision: 592b4775fc1de5871564f3b61637c8f5776a3932
Ancestor: 76f13d0fc7fbff369d01187fcc1b8f517854e119
Author: darkrain42 at pidgin.im
Date: 2009-06-07T06:19:12
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/592b4775fc1de5871564f3b61637c8f5776a3932
Modified files:
libpurple/protocols/jabber/buddy.c
ChangeLog:
Plug a leak from changing this to use jabber_get_bare_jid instead of normalize.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/buddy.c 2a2a7fdf336f945c792bffdd4a252fc9d9ac5d9f
+++ libpurple/protocols/jabber/buddy.c 7ebbbef380b1df2132a437d3d0bdca4c2c2f57ec
@@ -69,7 +69,7 @@ JabberBuddy *jabber_buddy_find(JabberStr
gboolean create)
{
JabberBuddy *jb;
- const char *realname;
+ char *realname;
if (js->buddies == NULL)
return NULL;
@@ -81,8 +81,9 @@ JabberBuddy *jabber_buddy_find(JabberStr
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;
}
More information about the Commits
mailing list