aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-08-27 07:54:52 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-08-27 07:54:53 -0700
commit372648a70bbb2778edcdad588c8d133a6c55a033 (patch)
tree023ad19e9db50275f95a083b2ce2abd812fcd064
parentc2ad1992ce99225f79a05ecaed619ec6b52f7bb1 (diff)
parentc005897dd8d0bcbeb7f715fef601edec7128eb91 (diff)
downloadexternal_skia-372648a70bbb2778edcdad588c8d133a6c55a033.zip
external_skia-372648a70bbb2778edcdad588c8d133a6c55a033.tar.gz
external_skia-372648a70bbb2778edcdad588c8d133a6c55a033.tar.bz2
Merge "Fix access to freed memory"
-rw-r--r--src/images/SkImageDecoder_libjpeg.cpp2
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;