Index: src/images/SkImageDecoder_libpng.cpp |
diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp |
index b51ffb9ea3676799d2387cdc3283ed2472cc345d..02ba6af90a34be865e92105c4c29ade78c39bcfc 100644 |
--- a/src/images/SkImageDecoder_libpng.cpp |
+++ b/src/images/SkImageDecoder_libpng.cpp |
@@ -255,6 +255,7 @@ bool SkPNGImageDecoder::onDecodeInit(SkStream* sk_stream, png_structp *png_ptrp, |
* set up your own error handlers in the png_create_read_struct() earlier. |
*/ |
if (setjmp(png_jmpbuf(png_ptr))) { |
+ png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); |
return false; |
} |