comparison libpurple/protocols/jabber/parser.c @ 15634: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 0d4890637238
children 32c366eeeb99
comparison
equal deleted inserted replaced
15633:b4ac51aebf65 15634:baec42670246
52 if(!xmlStrcmp(attributes[i], (xmlChar*) "version") 52 if(!xmlStrcmp(attributes[i], (xmlChar*) "version")
53 && !strcmp(attrib, "1.0")) { 53 && !strcmp(attrib, "1.0")) {
54 js->protocol_version = JABBER_PROTO_1_0; 54 js->protocol_version = JABBER_PROTO_1_0;
55 g_free(attrib); 55 g_free(attrib);
56 } else if(!xmlStrcmp(attributes[i], (xmlChar*) "id")) { 56 } else if(!xmlStrcmp(attributes[i], (xmlChar*) "id")) {
57 if(js->stream_id) 57 g_free(js->stream_id);
58 g_free(js->stream_id);
59 js->stream_id = attrib; 58 js->stream_id = attrib;
59 } else {
60 g_free(attrib);
60 } 61 }
61 } 62 }
62 if(js->protocol_version == JABBER_PROTO_0_9) 63 if(js->protocol_version == JABBER_PROTO_0_9)
63 js->auth_type = JABBER_AUTH_IQ_AUTH; 64 js->auth_type = JABBER_AUTH_IQ_AUTH;
64 65