aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-07-11 12:07:29 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-07-11 12:07:29 +0530
commitb666cf57efc0028a8648b068ffe6ba1630784444 (patch)
treed9b3fecf871cec25e594e3c7701e02ea8c512165
parent5a17c38a051e3c3a9574d292d63d477a5e8569f1 (diff)
main: (MMIOT *) is freed by markdown()
-rw-r--r--src/main.c14
1 files changed, 6 insertions, 8 deletions
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;
}