mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.24beta01.tar
This commit is contained in:
17
pngread.c
17
pngread.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.20 September 7, 2007
|
||||
* Last changed in libpng 1.2.24 November 20, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -1099,13 +1099,19 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
|
||||
png_structp png_ptr = NULL;
|
||||
png_infop info_ptr = NULL, end_info_ptr = NULL;
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
png_free_ptr free_fn;
|
||||
png_voidp mem_ptr;
|
||||
png_free_ptr free_fn = NULL;
|
||||
png_voidp mem_ptr = NULL;
|
||||
#endif
|
||||
|
||||
png_debug(1, "in png_destroy_read_struct\n");
|
||||
if (png_ptr_ptr != NULL)
|
||||
{
|
||||
png_ptr = *png_ptr_ptr;
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
free_fn = png_ptr->free_fn;
|
||||
mem_ptr = png_ptr->mem_ptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (info_ptr_ptr != NULL)
|
||||
info_ptr = *info_ptr_ptr;
|
||||
@@ -1113,11 +1119,6 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
|
||||
if (end_info_ptr_ptr != NULL)
|
||||
end_info_ptr = *end_info_ptr_ptr;
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
free_fn = png_ptr->free_fn;
|
||||
mem_ptr = png_ptr->mem_ptr;
|
||||
#endif
|
||||
|
||||
png_read_destroy(png_ptr, info_ptr, end_info_ptr);
|
||||
|
||||
if (info_ptr != NULL)
|
||||
|
||||
Reference in New Issue
Block a user