From 171e274b9aa2d9d412d33acac223616185697654 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Tue, 9 Feb 2010 14:20:08 +0000 Subject: [PATCH] Fix memleak --- Src/gui/menu.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/gui/menu.cpp b/Src/gui/menu.cpp index 5cadb08..ba64c55 100644 --- a/Src/gui/menu.cpp +++ b/Src/gui/menu.cpp @@ -299,6 +299,8 @@ void Menu::setText(const char **messages, int *submenu_defaults) int i; /* Free the old stuff */ + for (i = 0; i < this->n_entries; i++) + free((void*)this->pp_msgs[i]); this->n_submenus = 0; free(this->p_submenus); free(this->pp_msgs);