Skip to content

Commit

Permalink
Fix minor memory leak in MythUIButtonList::DistributeButtons() discov…
Browse files Browse the repository at this point in the history
…ered by Coverity
  • Loading branch information
stuartm committed May 9, 2012
1 parent a68210c commit 805cac5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mythtv/libs/libmythui/mythuibuttonlist.cpp
Expand Up @@ -832,7 +832,10 @@ bool MythUIButtonList::DistributeButtons(void)
first_item, last_item, selected_column,
skip_cols, grow_left, true, &col_widths,
height, 0, 0, col_cnt, wrapped))
{
delete[] col_widths;
return false;
}

m_columns = col_cnt;

Expand Down Expand Up @@ -865,7 +868,10 @@ bool MythUIButtonList::DistributeButtons(void)
first_item, last_item, selected_column,
skip_cols, grow_left, true, &col_widths,
height, 0, 0, col_cnt, wrapped))
{
delete[] col_widths;
return false;
}
}

if (selected_column != -1)
Expand Down

0 comments on commit 805cac5

Please sign in to comment.