We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2010

Summary: Memory leaks in do_layer_surface function in IMG_xcf.c file
Product: SDL_image Reporter: Nitz <nitin.j4>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: Linux   
Attachments: do_layer_surface patch for memory leaks

Description Nitz 2013-08-05 05:48:25 UTC
In static int do_layer_surface (SDL_Surface * surface, SDL_RWops * src, xcf_header * head, xcf_layer * layer, load_tile_type load_tile)

hierarchy, level and tile pointers are getting leak at default cases of switch statement.
I have attached the modified function, kindly see the diff.

Cheers.
Comment 1 Nitz 2013-08-05 05:49:46 UTC
Created attachment 1271 [details]
do_layer_surface patch for memory leaks
Comment 2 Sam Lantinga 2013-08-07 12:18:58 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL_image/rev/e108e1228d62