Fix memleak

This commit is contained in:
simon.kagstrom 2010-02-09 14:20:08 +00:00
parent 401b93baa9
commit 171e274b9a

View File

@ -299,6 +299,8 @@ void Menu::setText(const char **messages, int *submenu_defaults)
int i; int i;
/* Free the old stuff */ /* Free the old stuff */
for (i = 0; i < this->n_entries; i++)
free((void*)this->pp_msgs[i]);
this->n_submenus = 0; this->n_submenus = 0;
free(this->p_submenus); free(this->p_submenus);
free(this->pp_msgs); free(this->pp_msgs);