Commit 5123c425 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix resource leak

19. leaked_storage: Variable tile going out of scope leaks the storage it points to.

CID:249019
parent c9a3e20a
......@@ -484,11 +484,13 @@ static struct Tile *
flattenTopdown(struct FlattenSpec *spec, struct Tile *top,
unsigned nlayers, const struct rect *where)
{
struct Tile *tile;
struct Tile *tile = 0;
while( nlayers-- ) {
if( tileSummary(top) & TILESUMMARY_ALLFULL )
if( tileSummary(top) & TILESUMMARY_ALLFULL ) {
freeTile(tile);
return top ;
}
if( !spec->layers[nlayers].isVisible )
continue ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment