mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Restored part of ~PngObjectHandler() that was deleted from
contrib/oss-fuzz/libpng_read_fuzzer.cc
This commit is contained in:
@@ -36,6 +36,16 @@ struct PngObjectHandler {
|
|||||||
BufState* buf_state = nullptr;
|
BufState* buf_state = nullptr;
|
||||||
|
|
||||||
~PngObjectHandler() {
|
~PngObjectHandler() {
|
||||||
|
if (png_handler.row_ptr)
|
||||||
|
png_free(png_handler.png_ptr, png_handler.row_ptr);
|
||||||
|
if (png_handler.end_info_ptr)
|
||||||
|
png_destroy_read_struct(&png_handler.png_ptr, &png_handler.info_ptr,
|
||||||
|
&png_handler.end_info_ptr);
|
||||||
|
else if (png_handler.info_ptr)
|
||||||
|
png_destroy_read_struct(&png_handler.png_ptr, &png_handler.info_ptr,
|
||||||
|
nullptr);
|
||||||
|
else
|
||||||
|
png_destroy_read_struct(&png_handler.png_ptr, nullptr, nullptr);
|
||||||
delete buf_state;
|
delete buf_state;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user