changeset 7615:310013ee693e

[gaim-migrate @ 8239] plug a small leak committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 23 Nov 2003 22:53:34 +0000
parents 48d7eea88598
children a4acf41898c1
files src/protocols/jabber/presence.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c	Sun Nov 23 21:03:28 2003 +0000
+++ b/src/protocols/jabber/presence.c	Sun Nov 23 22:53:34 2003 +0000
@@ -217,6 +217,7 @@
 			continue;
 
 		if(!strcmp(y->name, "status")) {
+			g_free(status);
 			status = xmlnode_get_data(y);
 		} else if(!strcmp(y->name, "priority")) {
 			char *p = xmlnode_get_data(y);
@@ -273,6 +274,7 @@
 
 			jabber_chat_destroy(chat);
 			jabber_id_free(jid);
+			g_free(status);
 			return;
 		}
 
@@ -302,6 +304,7 @@
 			gaim_debug(GAIM_DEBUG_INFO, "jabber",
 					"got unexpected presence from %s, ignoring\n", from);
 			jabber_id_free(jid);
+			g_free(status);
 			return;
 		}
 
@@ -310,6 +313,7 @@
 		if((b = gaim_find_buddy(js->gc->account, buddy_name)) == NULL) {
 			jabber_id_free(jid);
 			g_free(buddy_name);
+			g_free(status);
 			return;
 		}