Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: core/src/fxcodec/codec/fx_codec_jbig.cpp

Issue 1346043003: Fix a leak in CJBig2_CachePair. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/codec/fx_codec_jbig.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index dec7330fe2f673ce44bb2a68a678c1c4cf342ca9..dca653de31b4af2dd7718f18c5be179986ebaef0 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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698