diff options
author | Nikolay Pisanov <Nikolay.Pisanov@teleca.com> | 2012-05-02 11:17:36 +0400 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonymobile.com> | 2012-08-27 09:19:55 +0200 |
commit | c005897dd8d0bcbeb7f715fef601edec7128eb91 (patch) | |
tree | 023ad19e9db50275f95a083b2ce2abd812fcd064 /src | |
parent | c2ad1992ce99225f79a05ecaed619ec6b52f7bb1 (diff) | |
download | external_skia-c005897dd8d0bcbeb7f715fef601edec7128eb91.zip external_skia-c005897dd8d0bcbeb7f715fef601edec7128eb91.tar.gz external_skia-c005897dd8d0bcbeb7f715fef601edec7128eb91.tar.bz2 |
Fix access to freed memory
Source should be freed after all jpeg operations completed
since it is used by these operations.
Change-Id: Ieb0741e1d219dc0513133a94d47df86b5f95cf29
Diffstat (limited to 'src')
-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; |