Commit c005897d authored by Nikolay Pisanov's avatar Nikolay Pisanov Committed by Johan Redestig
Browse files

Fix access to freed memory

Source should be freed after all jpeg operations completed
since it is used by these operations.

Change-Id: Ieb0741e1d219dc0513133a94d47df86b5f95cf29
parent c2ad1992
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment