changeset 14623:86e1ebd8ee7f

[gaim-migrate @ 17352] Avoid allocating, duping and deallocating. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 26 Sep 2006 00:28:02 +0000
parents f8beee12ade9
children 776615acf309
files libgaim/protocols/jabber/parser.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;