weimingtom / angel-engine

Automatically exported from code.google.com/p/angel-engine
0 stars 0 forks source link

PNGLoader never releases file #92

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In Textures.cpp

        fread(PNG_header, 1, 8, PNG_file);
        if (png_sig_cmp(PNG_header, 0, 8) != 0)
        {
            if (!optional)
                sysLog.Printf("ERROR: %s is not a PNG.", filename.c_str());
            return false;
        }

Will not close the file, causing a leak. This is around line 180.

Original issue reported on code.google.com by LoveOver...@gmail.com on 10 Apr 2014 at 6:21