changeset 7429:58a426e1bd1a

[gaim-migrate @ 8033] plug a memleak, and fix a segfault committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 05 Nov 2003 00:11:31 +0000
parents ab1ddb5c1216
children 783eea64614c
files src/blist.c src/protocols/jabber/jutil.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/blist.c	Tue Nov 04 23:52:34 2003 +0000
+++ b/src/blist.c	Wed Nov 05 00:11:31 2003 +0000
@@ -1228,8 +1228,11 @@
 	if (!name)
 		return NULL;
 
+	hb.account = account;
 	hb.name = g_strdup(gaim_normalize(account, name));
-	hb.account = account;
+
+	if(!hb.name)
+		return NULL;
 
 	for(group = gaimbuddylist->root; group; group = group->next) {
 		hb.group = group;
--- a/src/protocols/jabber/jutil.c	Tue Nov 04 23:52:34 2003 +0000
+++ b/src/protocols/jabber/jutil.c	Wed Nov 05 00:11:31 2003 +0000
@@ -288,6 +288,8 @@
 		g_snprintf(buf, sizeof(buf), "%s%s%s", jid->node ? jid->node : "",
 				jid->node ? "@" : "", jid->domain);
 
+	jabber_id_free(jid);
+
 	return buf;
 }