summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-23 16:50:51 -0700
committerLei Zhang <thestig@chromium.org>2015-09-23 16:50:51 -0700
commitb6b336a0a1849526f66c49588daa2ccdd09d42cd (patch)
tree496f57e839fc4a92583a2da6d1b81d4b5b94f79e /core
parentc4e940d803113552a146cd059b1ca793a1f72a22 (diff)
downloadpdfium-b6b336a0a1849526f66c49588daa2ccdd09d42cd.tar.xz
Fix a leak in CJBig2_CachePair.
R=jbreiden@google.com Review URL: https://codereview.chromium.org/1346043003 .
Diffstat (limited to 'core')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jbig.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index dec7330fe2..dca653de31 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -10,7 +10,13 @@
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();
}