mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Fix the API comment about png_data_freer
The old note about this function being unlikely to work correctly was likely incorrect.
This commit is contained in:
parent
0dfe422e9f
commit
6abf8c1e91
1
png.c
1
png.c
@ -447,7 +447,6 @@ png_info_init_3,(png_infopp ptr_ptr, size_t png_info_struct_size),
|
|||||||
memset(info_ptr, 0, (sizeof *info_ptr));
|
memset(info_ptr, 0, (sizeof *info_ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The following API is not called internally */
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr,
|
png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||||
int freer, png_uint_32 mask)
|
int freer, png_uint_32 mask)
|
||||||
|
|||||||
7
png.h
7
png.h
@ -1730,12 +1730,9 @@ PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr));
|
|||||||
PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
|
PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
|
||||||
png_inforp info_ptr, png_uint_32 free_me, int num));
|
png_inforp info_ptr, png_uint_32 free_me, int num));
|
||||||
|
|
||||||
/* Reassign responsibility for freeing existing data, whether allocated
|
/* Reassign the responsibility for freeing existing data, whether allocated
|
||||||
* by libpng or by the application; this works on the png_info structure passed
|
* by libpng or by the application; this works on the png_info structure passed
|
||||||
* in, it does not change the state for other png_info structures.
|
* in, without changing the state for other png_info structures.
|
||||||
*
|
|
||||||
* It is unlikely that this function works correctly as of 1.6.0 and using it
|
|
||||||
* may result either in memory leaks or double free of allocated data.
|
|
||||||
*/
|
*/
|
||||||
PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
|
PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
|
||||||
png_inforp info_ptr, int freer, png_uint_32 mask));
|
png_inforp info_ptr, int freer, png_uint_32 mask));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user