changeset 4874:f98467b35b95

[gaim-migrate @ 5204] plug a few more memleaks committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 23 Mar 2003 18:47:33 +0000
parents cb5bb2972a4b
children 26837f462a66
files src/dialogs.c src/protocols/jabber/jabber.c
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialogs.c	Sun Mar 23 15:54:29 2003 +0000
+++ b/src/dialogs.c	Sun Mar 23 18:47:33 2003 +0000
@@ -3675,6 +3675,9 @@
 	char *x = g_object_get_data(win, "log_window");
 	if (x)
 		g_free(x);
+	x = g_object_get_data(win, "name");
+	if (x)
+		g_free(x);
 }
 
 void conv_show_log(GtkWidget *w, gpointer data)
--- a/src/protocols/jabber/jabber.c	Sun Mar 23 15:54:29 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Sun Mar 23 18:47:33 2003 +0000
@@ -3784,11 +3784,16 @@
 	/*
 	 * Send only if there's actually any *information* to send
 	 */
-	if((vc_node = xmlstr2xmlnode(info)) != NULL && xmlnode_get_name(vc_node) != NULL &&
-			g_ascii_strncasecmp(xmlnode_get_name(vc_node), "vcard", 5) == 0) {
-		xmlnode_insert_tag_node(x, vc_node);
-		debug_printf("jabber: vCard packet: %s\n", xmlnode2str(x));
-		gjab_send(gjc, x);
+	vc_node = xmlstr2xmlnode(info);
+
+	if(vc_node) {
+		if (xmlnode_get_name(vc_node) &&
+				!g_ascii_strncasecmp(xmlnode_get_name(vc_node), "vcard", 5)) {
+			xmlnode_insert_tag_node(x, vc_node);
+			debug_printf("jabber: vCard packet: %s\n", xmlnode2str(x));
+			gjab_send(gjc, x);
+		}
+		xmlnode_free(vc_node);
 	}
 
 	xmlnode_free(x);