Mercurial > pidgin
diff libpurple/protocols/jabber/parser.c @ 17876:7a3a66c6530a
Fixed a leak: The XML parser was never cleaned up on disconnect.
| author | Andreas Monitzer <pidgin@monitzer.com> |
|---|---|
| date | Wed, 20 Jun 2007 00:13:02 +0000 |
| parents | 32c366eeeb99 |
| children | 108f3b42976f |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/parser.c Tue Jun 19 23:54:52 2007 +0000 +++ b/libpurple/protocols/jabber/parser.c Wed Jun 20 00:13:02 2007 +0000 @@ -174,6 +174,10 @@ * the parser context when you try to use it (this way, it can figure * out the encoding at creation time. So, setting up the parser is * just a matter of destroying any current parser. */ + jabber_parser_free(js); +} + +void jabber_parser_free(JabberStream *js) { if (js->context) { xmlParseChunk(js->context, NULL,0,1); xmlFreeParserCtxt(js->context); @@ -181,7 +185,6 @@ } } - void jabber_parser_process(JabberStream *js, const char *buf, int len) { if (js->context == NULL) {
