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

Side by Side Diff: third_party/lcms2-2.6/0006-memory-leak-Type_NamedColor_Read.patch

Issue 2359243003: Fix memory leaks in lcms (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
(Empty)
1 diff --git a/third_party/lcms2-2.6/src/cmstypes.c b/third_party/lcms2-2.6/src/cm stypes.c
2 index feba387..4d24fc2 100644
3 --- a/third_party/lcms2-2.6/src/cmstypes.c
4 +++ b/third_party/lcms2-2.6/src/cmstypes.c
5 @@ -3102,7 +3102,7 @@ void *Type_NamedColor_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* i
6
7 if (nDeviceCoords > cmsMAXCHANNELS) {
8 cmsSignalError(self->ContextID, cmsERROR_RANGE, "Too many device coordi nates '%d'", nDeviceCoords);
9 - return 0;
10 + goto Error;
11 }
12 for (i=0; i < count; i++) {
13
14 @@ -3111,7 +3111,7 @@ void *Type_NamedColor_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* i
15 char Root[33];
16
17 memset(Colorant, 0, sizeof(Colorant));
18 - if (io -> Read(io, Root, 32, 1) != 1) return NULL;
19 + if (io -> Read(io, Root, 32, 1) != 1) goto Error;
20 Root[32] = 0;
21 if (!_cmsReadUInt16Array(io, 3, PCS)) goto Error;
22 if (!_cmsReadUInt16Array(io, nDeviceCoords, Colorant)) goto Error;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698