From 4adb4b1013e6fbd057fe6158a911e7b860a78075 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 21 Mar 2017 19:48:08 -0700 Subject: Don't leak a ternary tree when building the menu's initial path --- menu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'menu.c') diff --git a/menu.c b/menu.c index 277697e..cd5cf0c 100644 --- a/menu.c +++ b/menu.c @@ -177,6 +177,8 @@ void * menu_write_w(uint32_t address, void * context, uint16_t value) 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; -- cgit v1.2.3