diff options
author | Zhongjun Chen <zhongjunx.chen@intel.com> | 2012-05-22 19:16:44 +0800 |
---|---|---|
committer | Shuo Gao <shuo.gao@intel.com> | 2012-08-14 22:00:17 +0800 |
commit | d8f575c86838a8f546c90692bfea0bbe30a92dbe (patch) | |
tree | cec59749328a469f96269841b63f8218ccbb61e6 | |
parent | 456fc154cef79072c3ceeae231a91045e9cb0e01 (diff) | |
download | external_skia-d8f575c86838a8f546c90692bfea0bbe30a92dbe.zip external_skia-d8f575c86838a8f546c90692bfea0bbe30a92dbe.tar.gz external_skia-d8f575c86838a8f546c90692bfea0bbe30a92dbe.tar.bz2 |
[Skia]: fix TOMBSTONE issue when browsing JPEG image and exiting Gallery
When browsing JPEG image and then exiting Gallery, the TOMBSTONE issue
occour. This is because JPEG Decode method still access a pointer which has been deleted.
This patch can fix it.
Change-Id: I3ac3e4b8f37d352a70676abb6d151961e873e459
Author: Zhongjun Chen <zhongjunx.chen@intel.com>
Signed-off-by: Zhongjun Chen <zhongjunx.chen@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 37479
-rw-r--r-- | src/images/SkImageDecoder_libjpeg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp index fbb6887..33f222c 100644 --- a/src/images/SkImageDecoder_libjpeg.cpp +++ b/src/images/SkImageDecoder_libjpeg.cpp @@ -48,9 +48,9 @@ public: SkJPEGImageIndex() {} virtual ~SkJPEGImageIndex() { jpeg_destroy_huffman_index(index); - delete cinfo->src; jpeg_finish_decompress(cinfo); jpeg_destroy_decompress(cinfo); + delete cinfo->src; free(cinfo); } jpeg_decompress_struct *cinfo; |