From 327af51a28fe292cfc4a68caa086a13175a69719 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 21 Aug 2010 18:27:32 +0100 Subject: Some general cleanup, plus fixing a bug in the memberlist parsing code: the lists can come in in any order, so parse it *completely* before showing auth requests. --- lib/xmltree.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/xmltree.c') 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 ) -- cgit v1.2.3