comparison 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
comparison
equal deleted inserted replaced
1292:5905593d6828 1293:72ea3885e7b5
175 #endif 175 #endif
176 } 176 }
177 tern_node *vars = tern_insert_ptr(NULL, "HOME", get_home_dir()); 177 tern_node *vars = tern_insert_ptr(NULL, "HOME", get_home_dir());
178 vars = tern_insert_ptr(vars, "EXEDIR", get_exe_dir()); 178 vars = tern_insert_ptr(vars, "EXEDIR", get_exe_dir());
179 menu->curpath = replace_vars(menu->curpath, vars, 1); 179 menu->curpath = replace_vars(menu->curpath, vars, 1);
180 tern_free(vars);
181
180 } 182 }
181 if (menu->state) { 183 if (menu->state) {
182 uint32_t dst = menu->latch << 16 | value; 184 uint32_t dst = menu->latch << 16 | value;
183 switch (address >> 2) 185 switch (address >> 2)
184 { 186 {