[Plib-devel] [PATCH] Memory leak in SSG SGI loader
Brought to you by:
sjbaker
From: Jan R. <slo...@gm...> - 2006-04-14 13:17:03
|
Hello, while valgrind'ing CRRCsim to find some nasty memory leaks I stumbled upon a leak in SSG's SGI texture loader. A temporary array is allocated but never free'd when loading RLE compressed textures. The attached patch fixes this issue and corrects some minor indentation inconsistencies. Can someone please apply it to ssgLoadSGI.cxx? Thanks a lot in advance! Valgrind reported another leak in ssgInit() (ssg.cxx:128): new ssgContext ; /* Sets the current context with defaults */ Wouldn't it make sense to keep a pointer to this context and have some function like ssgExit() clean it up before exiting from the application? There's another leak in the AC3D loader. The allocation occurs in do_material(char*) (ssgLoadAC.cxx:292) and is never undone, but I've not yet investigated how to fix this one. Kind regards, Jan R. -- Jan Reucker email: jan dot reucker at web dot de web: http://www.reucker-online.de |