mirror of https://github.com/axmolengine/axmol.git
Fix possible memory leak
This commit is contained in:
parent
6feef5fa55
commit
973c8efb8b
|
@ -2028,6 +2028,9 @@ bool Image::saveImageToPNG(const std::string& filePath, bool isToRGB)
|
||||||
{
|
{
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
|
|
||||||
|
free(row_pointers);
|
||||||
|
row_pointers = nullptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue