2006-06-06 Mikael Hallendal <micke@imendio.com>
authorhallski <hallski>
Tue, 06 Jun 2006 12:39:19 +0000
changeset 152 c736903f577b
parent 145 ee777a1f5c62
child 157 46f819771198
2006-06-06 Mikael Hallendal <micke@imendio.com> * loudmouth/lm-connection.c: (connection_free): - Call lm_parser_free to actually free it. * loudmouth/lm-parser.c: (lm_parser_free): - Free up memory used by the parser. - Fixes LM-39
ChangeLog
loudmouth/lm-connection.c
loudmouth/lm-parser.c
--- a/ChangeLog	Sat May 27 08:34:10 2006 +0000
+++ b/ChangeLog	Tue Jun 06 12:39:19 2006 +0000
@@ -1,3 +1,11 @@
+2006-06-06  Mikael Hallendal  <micke@imendio.com>
+
+	* loudmouth/lm-connection.c: (connection_free):
+	- Call lm_parser_free to actually free it.
+	* loudmouth/lm-parser.c: (lm_parser_free):
+	- Free up memory used by the parser.
+	- Fixes LM-39
+
 2006-05-27  Mikael Hallendal  <micke@imendio.com>
 
 	* loudmouth/lm-ssl.c: (ssl_verify_certificate):
--- a/loudmouth/lm-connection.c	Sat May 27 08:34:10 2006 +0000
+++ b/loudmouth/lm-connection.c	Tue Jun 06 12:39:19 2006 +0000
@@ -205,6 +205,10 @@
 	g_free (connection->server);
 	g_free (connection->jid);
 
+	if (connection->parser) {
+		lm_parser_free (connection->parser);
+	}
+
 	/* Unref handlers */
 	for (i = 0; i < LM_MESSAGE_TYPE_UNKNOWN; ++i) {
 		GSList *l;
--- a/loudmouth/lm-parser.c	Sat May 27 08:34:10 2006 +0000
+++ b/loudmouth/lm-parser.c	Tue Jun 06 12:39:19 2006 +0000
@@ -264,8 +264,11 @@
 	if (parser->notify) {
 		(* parser->notify) (parser->user_data);
 	}
-	
+
+	if (parser->context) {
+		g_markup_parse_context_free (parser->context);
+	}
+	g_free (parser->m_parser);
 	g_free (parser);
-	g_print ("Free parser\n");
 }