changeset 24372:dd787f8d5e91

Fix a potential leak, thanks to "KuSh". Fixes #7463.
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 07 Nov 2008 02:56:10 +0000
parents 6757bffb3d3a
children adc1073040bf c6c6dc6ccdc7
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Fri Nov 07 02:52:31 2008 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Fri Nov 07 02:56:10 2008 +0000
@@ -6091,10 +6091,11 @@
 	gc = purple_account_get_connection(buddy->account);
 	od = gc->proto_data;
 
-	data = g_new(struct name_data, 1);
-
 	if (!(g = purple_buddy_get_group(buddy)))
 		return;
+
+	data = g_new(struct name_data, 1);
+
 	comment = aim_ssi_getcomment(od->ssi.local, g->name, buddy->name);
 	comment_utf8 = comment ? oscar_utf8_try_convert(gc->account, comment) : NULL;