Fix possible memory leak

This commit is contained in:
Anton Sokolchenko 2014-04-12 18:34:11 +03:00
parent 6feef5fa55
commit 973c8efb8b
1 changed files with 3 additions and 0 deletions

View File

@ -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;
} }