Fix a leak in CJBig2_CachePair.
authorLei Zhang <thestig@chromium.org>
Wed, 23 Sep 2015 23:50:51 +0000 (16:50 -0700)
committerLei Zhang <thestig@chromium.org>
Wed, 23 Sep 2015 23:50:51 +0000 (16:50 -0700)
R=jbreiden@google.com

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

core/src/fxcodec/codec/fx_codec_jbig.cpp

index dec7330..dca653d 100644 (file)
 CCodec_Jbig2Context::CCodec_Jbig2Context() {
   FXSYS_memset(this, 0, sizeof(CCodec_Jbig2Context));
 }
-CCodec_Jbig2Module::~CCodec_Jbig2Module() {}
+
+CCodec_Jbig2Module::~CCodec_Jbig2Module() {
+  for (auto it : m_SymbolDictCache) {
+    delete it.second;
+  }
+}
+
 void* CCodec_Jbig2Module::CreateJbig2Context() {
   return new CCodec_Jbig2Context();
 }