changeset 14068:6cb8bdc3366f

[gaim-migrate @ 16689] Plug a leak that I didn't notice while making the other fixes. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 10 Aug 2006 21:22:55 +0000
parents f3ed5f4efcae
children d594f0466585
files src/protocols/jabber/buddy.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/buddy.c	Thu Aug 10 21:08:00 2006 +0000
+++ b/src/protocols/jabber/buddy.c	Thu Aug 10 21:22:55 2006 +0000
@@ -533,7 +533,7 @@
 	GaimRequestField *field;
 	const struct vcard_template *vc_tp;
 	const char *user_info;
-	char *cdata;
+	char *cdata = NULL;
 	xmlnode *x_vc_data = NULL;
 
 	fields = gaim_request_fields_new();
@@ -564,10 +564,7 @@
 			}
 			if(data_node)
 				cdata = xmlnode_get_data(data_node);
-			else
-				cdata = NULL;
-		} else
-			cdata = NULL;
+		}
 
 		if(strcmp(vc_tp->tag, "DESC") == 0) {
 			field = gaim_request_field_string_new(vc_tp->tag,
@@ -579,6 +576,9 @@
 												  FALSE);
 		}
 
+		g_free(cdata);
+		cdata = NULL;
+
 		gaim_request_field_group_add_field(group, field);
 	}