Skip to content

Commit

Permalink
Fixed memory leak in libcommon clearWidgets
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Aug 14, 2011
1 parent a48fe86 commit 20bfb38
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doomsday/plugins/common/src/hu_lib.c
Expand Up @@ -175,7 +175,12 @@ static void clearWidgets(void)
{
uiwidget_t* obj = &widgets[i];
if(obj->type == GUI_GROUP)
free(obj->typedata);
{
guidata_group_t* grp = (guidata_group_t*)obj->typedata;
if(grp->widgetIds)
free(grp->widgetIds);
free(grp);
}
}}
free(widgets);
widgets = NULL;
Expand Down

0 comments on commit 20bfb38

Please sign in to comment.