diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-11-16 23:00:58 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-16 23:00:58 -0800 |
commit | c507d164f5856779d23ef030c2a656391707a5ac (patch) | |
tree | dddec1cf74a73a287ef3ed368cd644e3e9b0d1f3 /src | |
parent | 43a607c5aec4bd8d10486861bf2bc627f8846753 (diff) |
Free the string returned by html renderer in main program.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); } } |