markup: Fix leaks in container types in markup parser

This commit is contained in:
K. Lange 2023-02-16 12:25:27 +09:00
parent 75cbf09a37
commit 33d38e0182
2 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,7 @@ int markup_free_tag(struct markup_tag * tag) {
list_free(keys);
free(keys);
hashmap_free(tag->options);
free(tag->options);
return 0;
}

View File

@ -257,6 +257,8 @@ int markup_finish_renderer(struct MarkupState * state) {
markup_finish(state->parser);
list_free(state->state);
list_free(state->colors);
free(state->state);
free(state->colors);
int total = state->max_cursor_x - state->initial_left;
free(state);
return total;