summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 8f04deb..4340d76 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,10 +17,14 @@ void print_usage()
static void print_document(node_block *document, bool ast)
{
+ unsigned char *result;
if (ast) {
cmark_debug_print(document);
} else {
- printf("%s", cmark_render_html(document));
+
+ result = cmark_render_html(document);
+ printf("%s", result);
+ free(result);
}
}