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

Side by Side Diff: third_party/lcms2-2.6/src/cmsopt.c

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 unified diff | Download patch
« no previous file with comments | « third_party/lcms2-2.6/README.pdfium ('k') | third_party/lcms2-2.6/src/cmstypes.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //------------------------------------------------------------------------------ --- 1 //------------------------------------------------------------------------------ ---
2 // 2 //
3 // Little Color Management System 3 // Little Color Management System
4 // Copyright (c) 1998-2011 Marti Maria Saguer 4 // Copyright (c) 1998-2011 Marti Maria Saguer
5 // 5 //
6 // Permission is hereby granted, free of charge, to any person obtaining 6 // Permission is hereby granted, free of charge, to any person obtaining
7 // a copy of this software and associated documentation files (the "Software"), 7 // a copy of this software and associated documentation files (the "Software"),
8 // to deal in the Software without restriction, including without limitation 8 // to deal in the Software without restriction, including without limitation
9 // the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 // and/or sell copies of the Software, and to permit persons to whom the Softwar e 10 // and/or sell copies of the Software, and to permit persons to whom the Softwar e
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 // Remove prelinearization. Since we have duplicated the curve 606 // Remove prelinearization. Since we have duplicated the curve
607 // in destination LUT, the sampling shoud be applied after this stage. 607 // in destination LUT, the sampling shoud be applied after this stage.
608 cmsPipelineUnlinkStage(Src, cmsAT_BEGIN, &KeepPreLin); 608 cmsPipelineUnlinkStage(Src, cmsAT_BEGIN, &KeepPreLin);
609 } 609 }
610 } 610 }
611 } 611 }
612 612
613 // Allocate the CLUT 613 // Allocate the CLUT
614 CLUT = cmsStageAllocCLut16bit(Src ->ContextID, nGridPoints, Src ->InputChann els, Src->OutputChannels, NULL); 614 CLUT = cmsStageAllocCLut16bit(Src ->ContextID, nGridPoints, Src ->InputChann els, Src->OutputChannels, NULL);
615 if (CLUT == NULL) return FALSE; 615 if (CLUT == NULL) goto Error;
616 616
617 // Add the CLUT to the destination LUT 617 // Add the CLUT to the destination LUT
618 if (!cmsPipelineInsertStage(Dest, cmsAT_END, CLUT)) { 618 if (!cmsPipelineInsertStage(Dest, cmsAT_END, CLUT)) {
619 goto Error; 619 goto Error;
620 } 620 }
621 621
622 // Postlinearization tables are kept unless indicated by flags 622 // Postlinearization tables are kept unless indicated by flags
623 if (*dwFlags & cmsFLAGS_CLUT_POST_LINEARIZATION) { 623 if (*dwFlags & cmsFLAGS_CLUT_POST_LINEARIZATION) {
624 624
625 // Get a pointer to the postlinearization if present 625 // Get a pointer to the postlinearization if present
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 1786
1787 if (Opts ->OptimizePtr(PtrLut, Intent, InputFormat, OutputFormat, dw Flags)) { 1787 if (Opts ->OptimizePtr(PtrLut, Intent, InputFormat, OutputFormat, dw Flags)) {
1788 1788
1789 return TRUE; 1789 return TRUE;
1790 } 1790 }
1791 } 1791 }
1792 1792
1793 // Only simple optimizations succeeded 1793 // Only simple optimizations succeeded
1794 return AnySuccess; 1794 return AnySuccess;
1795 } 1795 }
OLDNEW
« no previous file with comments | « third_party/lcms2-2.6/README.pdfium ('k') | third_party/lcms2-2.6/src/cmstypes.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698