Mercurial > repos > blastem
diff menu.c @ 1293:72ea3885e7b5
Don't leak a ternary tree when building the menu's initial path
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 21 Mar 2017 19:48:08 -0700 |
parents | 5905593d6828 |
children | 071e761bcdcf |
line wrap: on
line diff
--- a/menu.c Tue Mar 21 00:40:25 2017 -0700 +++ b/menu.c Tue Mar 21 19:48:08 2017 -0700 @@ -177,6 +177,8 @@ tern_node *vars = tern_insert_ptr(NULL, "HOME", get_home_dir()); vars = tern_insert_ptr(vars, "EXEDIR", get_exe_dir()); menu->curpath = replace_vars(menu->curpath, vars, 1); + tern_free(vars); + } if (menu->state) { uint32_t dst = menu->latch << 16 | value;