[master] Free png_ptr->user_png_ver when destroying png_ptr.

This commit is contained in:
Glenn Randers-Pehrson
2009-11-02 06:04:47 -06:00
parent c75d7fb32e
commit 8e46375186
4 changed files with 12 additions and 0 deletions

View File

@@ -1179,6 +1179,11 @@ png_write_destroy(png_structp png_ptr)
free_fn = png_ptr->free_fn;
#endif
/* New member added in libpng-1.2.41, will be removed from 1.4.0 */
#ifdef PNG_iTXt_SUPPORTED
png_free(png_ptr, png_ptr->user_png_ver);
#endif
png_memset(png_ptr, 0, png_sizeof(png_struct));
png_ptr->error_fn = error_fn;