summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-22 19:17:19 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-22 19:17:19 -0500
commitf2edda528a3babe16d9da48580bdcb696e5fa664 (patch)
tree8e54df107de0bc3b87d147bb973e51eef76b769b /main.c
parent0f0a03b518ff6dbb61814896e5efc9b5878904e4 (diff)
fixed memory leaks
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index 2c35958..f04f984 100644
--- a/main.c
+++ b/main.c
@@ -436,12 +436,16 @@ int main(int argc, char **argv) {
SDL_GL_SwapWindow(window);
}
+ if (ted->menu)
+ menu_close(ted, false); // free any memory used by the current menu
+
SDL_GL_DeleteContext(glctx);
SDL_DestroyWindow(window);
SDL_Quit();
buffer_free(&ted->main_buffer);
buffer_free(&ted->line_buffer);
text_font_free(ted->font);
+ text_font_free(ted->font_bold);
free(ted);
#if _WIN32
for (int i = 0; i < argc; ++i)