aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmltree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xmltree.c')
-rw-r--r--lib/xmltree.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/xmltree.c b/lib/xmltree.c
index 3ec7e673..bee9007f 100644
--- a/lib/xmltree.c
+++ b/lib/xmltree.c
@@ -337,7 +337,11 @@ void xt_print( struct xt_node *node )
/* Print the attributes */
for( i = 0; node->attr[i].key; i ++ )
- printf( " %s=\"%s\"", node->attr[i].key, g_markup_escape_text( node->attr[i].value, -1 ) );
+ {
+ char *v = g_markup_escape_text( node->attr[i].value, -1 );
+ printf( " %s=\"%s\"", node->attr[i].key, v );
+ g_free( v );
+ }
/* /> in case there's really *nothing* inside this tag, otherwise
just >. */
@@ -357,7 +361,11 @@ void xt_print( struct xt_node *node )
{
for( i = 0; node->text[i] && isspace( node->text[i] ); i ++ );
if( node->text[i] )
- printf( "%s", g_markup_escape_text( node->text, -1 ) );
+ {
+ char *v = g_markup_escape_text( node->text, -1 );
+ printf( "%s", v );
+ g_free( v );
+ }
}
if( node->children )