aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosmin Truta <ctruta@gmail.com>2024-01-03 21:13:59 +0200
committerCosmin Truta <ctruta@gmail.com>2024-01-03 21:13:59 +0200
commit6abf8c1e91243ca27396558fb994617acd597335 (patch)
tree968d19109799fe1657459285c10e14624b537846
parent0dfe422e9f872d3a851d52fc45047bdfd6da0cf4 (diff)
downloadlibpng-6abf8c1e91243ca27396558fb994617acd597335.tar.gz
Fix the API comment about `png_data_freer`
The old note about this function being unlikely to work correctly was likely incorrect.
-rw-r--r--png.c1
-rw-r--r--png.h7
2 files changed, 2 insertions, 6 deletions
diff --git a/png.c b/png.c
index f01939424..0dbb234e5 100644
--- a/png.c
+++ b/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));
}
-/* The following API is not called internally */
void PNGAPI
png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr,
int freer, png_uint_32 mask)
diff --git a/png.h b/png.h
index b650379ce..f0f456057 100644
--- a/png.h
+++ b/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_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
- * in, it does not change 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.
+ * in, without changing the state for other png_info structures.
*/
PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
png_inforp info_ptr, int freer, png_uint_32 mask));