Only destroy huffman if build succeeded.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 27 Aug 2013 20:42:22 +0000 (20:42 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 27 Aug 2013 20:42:22 +0000 (20:42 +0000)
commit57a529877e65687de1fa4d19d52746427c6896dc
tree908f6bf1ca9488045e6d3be3ea4f658910b7328b
parent319e01f1aad7b81a88c019822def2411ffda0381
Only destroy huffman if build succeeded.

The earlier code assumed that if jpeg_create_huffman_index
succeeded but jpeg_build_huffman_index failed that the
index would still need to be destroyed. This is not the
case. Only call jpeg_destroy_huffman_index if both
succeeded.

BUG=http://b.corp.google.com/issue?id=10263847

Review URL: https://codereview.chromium.org/22859042

git-svn-id: http://skia.googlecode.com/svn/trunk@10954 2bbb7eff-a529-9590-31e7-b0007b416f81
src/images/SkImageDecoder_libjpeg.cpp