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

Unified Diff: third_party/lcms2-2.6/0007-memory-leak-OptimizeByResampling.patch

Issue 2359243003: Fix memory leaks in lcms (Closed)
Patch Set: Created 4 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
Index: third_party/lcms2-2.6/0007-memory-leak-OptimizeByResampling.patch
diff --git a/third_party/lcms2-2.6/0007-memory-leak-OptimizeByResampling.patch b/third_party/lcms2-2.6/0007-memory-leak-OptimizeByResampling.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2c55b94fa1d278bba1a648cc2115a71e8ed2e5bb
--- /dev/null
+++ b/third_party/lcms2-2.6/0007-memory-leak-OptimizeByResampling.patch
@@ -0,0 +1,13 @@
+diff --git a/third_party/lcms2-2.6/src/cmsopt.c b/third_party/lcms2-2.6/src/cmsopt.c
+index f885ef3..684910d 100644
+--- a/third_party/lcms2-2.6/src/cmsopt.c
++++ b/third_party/lcms2-2.6/src/cmsopt.c
+@@ -612,7 +612,7 @@ cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt3
+
+ // Allocate the CLUT
+ CLUT = cmsStageAllocCLut16bit(Src ->ContextID, nGridPoints, Src ->InputChannels, Src->OutputChannels, NULL);
+- if (CLUT == NULL) return FALSE;
++ if (CLUT == NULL) goto Error;
+
+ // Add the CLUT to the destination LUT
+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, CLUT)) {
« no previous file with comments | « third_party/lcms2-2.6/0006-memory-leak-Type_NamedColor_Read.patch ('k') | third_party/lcms2-2.6/README.pdfium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698