changeset 15635:baec42670246

Patch from MatsMattsson (Adium Trac #6429) which fixes a leak of attrib for any attribute that isn't 'id' or 'version'.
author Evan Schoenberg <evan.s@dreskin.net>
date Thu, 15 Feb 2007 15:21:27 +0000
parents b4ac51aebf65
children e023cc99eb39 37d9f44c7de1
files libpurple/protocols/jabber/parser.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/parser.c	Wed Feb 14 04:26:10 2007 +0000
+++ b/libpurple/protocols/jabber/parser.c	Thu Feb 15 15:21:27 2007 +0000
@@ -54,9 +54,10 @@
 				js->protocol_version = JABBER_PROTO_1_0;
 				g_free(attrib);
 			} else if(!xmlStrcmp(attributes[i], (xmlChar*) "id")) {
-				if(js->stream_id)
-					g_free(js->stream_id);
+				g_free(js->stream_id);
 				js->stream_id = attrib;
+			} else {
+				g_free(attrib);	
 			}
 		}
 		if(js->protocol_version == JABBER_PROTO_0_9)