[libpng16] Restored part of ~PngObjectHandler() that was deleted from
contrib/oss-fuzz/libpng_read_fuzzer.cc
This commit is contained in:
parent
84a5bf83ff
commit
dcd3edaf87
@ -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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user