File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1245,19 +1245,26 @@ void* AllocChunk(cmsIT8* it8, cmsUInt32Number size)
12451245
12461246 it8 -> Allocator .Used = 0 ;
12471247 new_block = (cmsUInt8Number * )AllocBigBlock (it8 , it8 -> Allocator .BlockSize );
1248- if (new_block == NULL )
1249- return NULL ;
1248+ if (new_block == NULL ) goto Error ;
12501249
12511250 it8 -> Allocator .Block = new_block ;
12521251 }
12531252
12541253 if (it8 -> Allocator .Block == NULL )
1255- return NULL ;
1254+ goto Error ;
12561255
12571256 ptr = it8 -> Allocator .Block + it8 -> Allocator .Used ;
12581257 it8 -> Allocator .Used += size ;
12591258
12601259 return (void * ) ptr ;
1260+
1261+ Error :
1262+
1263+ SynError (it8 , "Allocation error" );
1264+ it8 -> Allocator .BlockSize = 0 ;
1265+ it8 -> Allocator .Used = 0 ;
1266+ it8 -> Allocator .Block = NULL ;
1267+ return NULL ;
12611268}
12621269
12631270
You can’t perform that action at this time.
0 commit comments