Skip to content

Commit

Permalink
ccstruct/polyblk: Fix memory leak
Browse files Browse the repository at this point in the history
Coverity report:

CID 1164730 (#1 of 1): Resource leak (RESOURCE_LEAK)
4. leaked_storage: Variable lines going out of scope leaks the storage it points to.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Oct 24, 2016
1 parent c12757b commit aa945bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ccstruct/polyblk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ void POLY_BLOCK::fill(ScrollView* window, ScrollView::Color colour) {
}
}
}

delete lines;
}
#endif

Expand Down

0 comments on commit aa945bb

Please sign in to comment.