Re: [CrystalSpace] #983: memory leak in csCommonImageFileLoader (fix included)
"CrystalSpace" <[email protected]> Mon, 01 Jul 2013 10:14:45 -0000
| Newsgroups | gmane.comp.graphics.crystalspace.tracker |
|---|---|
| Message-ID | <[email protected]> |
#983: memory leak in csCommonImageFileLoader (fix included)
---------------------------+------------------------------------------------
Reporter: ralphcampbell | Owner: admin
Type: defect | Status: new
Priority: major | Milestone:
Component: loader | Version: V2.1
Keywords: |
---------------------------+------------------------------------------------
Description changed by sunshine:
Old description:
> I was using valgrind to find memory leaks in PlaneShift and found this
> one.
> The case is when a .png file with alpha data is loaded.
> See ImagePngFile::PngLoader::LoadData().
>
> {{{
> Index: libs/csplugincommon/imageloader/commonimagefile.cpp
> ===================================================================
> --- libs/csplugincommon/imageloader/commonimagefile.cpp (revision 39432)
> +++ libs/csplugincommon/imageloader/commonimagefile.cpp (working copy)
> @@ -38,6 +38,7 @@
> delete[] indexData;
> delete[] palette;
> delete[] rgbaData;
> + delete[] alpha;
> }
>
> }}}
New description:
I was using valgrind to find memory leaks in PlaneShift and found this
one.
The case is when a `.png` file with alpha data is loaded.
See ImagePngFile::PngLoader::LoadData().
{{{
#!diff
Index: libs/csplugincommon/imageloader/commonimagefile.cpp
===================================================================
--- libs/csplugincommon/imageloader/commonimagefile.cpp (revision 39432)
+++ libs/csplugincommon/imageloader/commonimagefile.cpp (working copy)
@@ -38,6 +38,7 @@
delete[] indexData;
delete[] palette;
delete[] rgbaData;
+ delete[] alpha;
}
}}}
--
--
Ticket URL: <http://trac.crystalspace3d.org/trac/CS/ticket/983#comment:1>
CrystalSpace <http://www.crystalspace3d.org/>
Free open-source 3D SDK.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev