Skip to content

Commit

Permalink
Plug memory leak when parsing colormap of XCF file
Browse files Browse the repository at this point in the history
  • Loading branch information
janisozaur committed May 19, 2019
1 parent 802a9ec commit aacd0f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions IMG_xcf.c
Expand Up @@ -398,6 +398,8 @@ static xcf_layer * read_xcf_layer (SDL_RWops * src, const xcf_header * h) {
l->offset_y = prop.data.offset.y;
} else if (prop.id == PROP_VISIBLE) {
l->visible = prop.data.visible ? 1 : 0;
} else if (prop.id == PROP_COLORMAP) {
SDL_free (prop.data.colormap.cmap);
}
} while (prop.id != PROP_END);

Expand Down

0 comments on commit aacd0f6

Please sign in to comment.