diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-21 18:27:32 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-21 18:27:32 +0100 |
commit | 327af51a28fe292cfc4a68caa086a13175a69719 (patch) | |
tree | 09a83946fb22e8577dede332676a7c5f4c7d5d8c /lib/xmltree.c | |
parent | a366cca62d3a55db4f12a94584f7e7f8fa00db02 (diff) |
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.
Diffstat (limited to 'lib/xmltree.c')
-rw-r--r-- | lib/xmltree.c | 12 |
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 ) |