[gaim-migrate @ 17352]

Tue, 26 Sep 2006 00:28:02 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Tue, 26 Sep 2006 00:28:02 +0000
changeset 14685
7622a9ca1794
parent 14684
059f925bcaee
child 14686
f3d13f21350c

[gaim-migrate @ 17352]
Avoid allocating, duping and deallocating.

libgaim/protocols/jabber/parser.c file | annotate | diff | comparison | revisions
--- a/libgaim/protocols/jabber/parser.c	Mon Sep 25 21:14:24 2006 +0000
+++ b/libgaim/protocols/jabber/parser.c	Tue Sep 26 00:28:02 2006 +0000
@@ -51,12 +51,12 @@
 			if(!strcmp(attributes[i], "version")
 					&& !strcmp(attrib, "1.0")) {
 				js->protocol_version = JABBER_PROTO_1_0;
+				g_free(attrib);
 			} else if(!strcmp(attributes[i], "id")) {
 				if(js->stream_id)
 					g_free(js->stream_id);
-				js->stream_id = g_strdup(attrib);
+				js->stream_id = attrib;
 			}
-			g_free(attrib);
 		}
 		if(js->protocol_version == JABBER_PROTO_0_9)
 			js->auth_type = JABBER_AUTH_IQ_AUTH;

mercurial