|
From: <ev...@us...> - 2007-02-13 22:21:36
|
Revision: 18189
http://svn.sourceforge.net/gaim/?rev=18189&view=rev
Author: evands
Date: 2007-02-13 14:21:30 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
Three memory leak fixes; the leaks were found by David Smith
Modified Paths:
--------------
trunk/libgaim/protocols/jabber/buddy.c
trunk/libgaim/protocols/jabber/roster.c
Modified: trunk/libgaim/protocols/jabber/buddy.c
===================================================================
--- trunk/libgaim/protocols/jabber/buddy.c 2007-02-09 17:16:32 UTC (rev 18188)
+++ trunk/libgaim/protocols/jabber/buddy.c 2007-02-13 22:21:30 UTC (rev 18189)
@@ -642,7 +642,9 @@
}
if(jbir) {
if(jbir->idle_seconds > 0) {
- gaim_notify_user_info_add_pair(user_info, _("Idle"), gaim_str_seconds_to_string(jbir->idle_seconds));
+ char *idle = gaim_str_seconds_to_string(jbir->idle_seconds);
+ gaim_notify_user_info_add_pair(user_info, _("Idle"), idle);
+ g_free(idle);
}
}
if(jbr && jbr->client.name) {
@@ -680,7 +682,9 @@
if(jbir) {
if(jbir->idle_seconds > 0) {
- gaim_notify_user_info_add_pair(user_info, _("Idle"), gaim_str_seconds_to_string(jbir->idle_seconds));
+ char *idle = gaim_str_seconds_to_string(jbir->idle_seconds);
+ gaim_notify_user_info_add_pair(user_info, _("Idle"), idle);
+ g_free(idle);
}
}
if(jbr && jbr->client.name) {
@@ -729,6 +733,7 @@
while(l) {
if(!strcmp(id, l->data)) {
jbi->ids = g_slist_remove(jbi->ids, l->data);
+ g_free(l->data);
return;
}
l = l->next;
Modified: trunk/libgaim/protocols/jabber/roster.c
===================================================================
--- trunk/libgaim/protocols/jabber/roster.c 2007-02-09 17:16:32 UTC (rev 18188)
+++ trunk/libgaim/protocols/jabber/roster.c 2007-02-13 22:21:30 UTC (rev 18189)
@@ -176,7 +176,7 @@
char *jid_norm;
const char *username;
- jid_norm = g_strdup(jabber_normalize(js->gc->account, jid));
+ jid_norm = jabber_normalize(js->gc->account, jid);
username = gaim_account_get_username(js->gc->account);
me = g_utf8_collate(jid_norm,
jabber_normalize(js->gc->account,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|