From b666cf57efc0028a8648b068ffe6ba1630784444 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Fri, 11 Jul 2025 12:07:29 +0530 Subject: main: (MMIOT *) is freed by markdown() --- src/main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ea7fb29..7a88ec4 100644 --- a/src/main.c +++ b/src/main.c @@ -72,7 +72,6 @@ handle_file(const char *path) if (dot && strcmp(dot, ".md") == 0) { MMIOT *doc = mkd_string(buffer, size, 0); template_write(base_template, NULL, out, doc, false); - /* free(doc); */ } else if (strlen(buffer) != 0) { list_t *content_headers = ingest(&buffer); template_write(base_template, content_headers, out, buffer, false); @@ -119,16 +118,15 @@ main(int argc, char **argv) printf("HANDLING: %s\n", filepath); handle_file(filepath); free(filepath); - } - for (x = (char **) md_resources; *x != NULL; x++) { - asprintf(&filepath, "%s.md", *x); - handle_file(filepath); - free(filepath); + return EXIT_SUCCESS; } - free(base_template->pre); - free(base_template->post); + /* for (x = (char **) md_resources; *x != NULL; x++) { */ + /* asprintf(&filepath, "%s.md", *x); */ + /* handle_file(filepath); */ + /* free(filepath); */ + /* } */ return EXIT_SUCCESS; } -- cgit v1.2.3