File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1989,7 +1989,11 @@ RestoreMSCWarning
19891989 length *=image -> colorspace == CMYKColorspace ? 4UL : 3UL ;
19901990 pixel_info = AcquireVirtualMemory (length ,sizeof (* pixels ));
19911991 if (pixel_info == (MemoryInfo * ) NULL )
1992- ThrowWriterException (ResourceLimitError ,"MemoryAllocationFailed" );
1992+ {
1993+ xref = (MagickOffsetType * ) RelinquishMagickMemory (xref );
1994+ ThrowWriterException (ResourceLimitError ,
1995+ "MemoryAllocationFailed" );
1996+ }
19931997 pixels = (unsigned char * ) GetVirtualMemoryBlob (pixel_info );
19941998 /*
19951999 Dump runoffset encoded pixels.
@@ -2086,8 +2090,11 @@ RestoreMSCWarning
20862090 length = (size_t ) number_pixels ;
20872091 pixel_info = AcquireVirtualMemory (length ,sizeof (* pixels ));
20882092 if (pixel_info == (MemoryInfo * ) NULL )
2089- ThrowWriterException (ResourceLimitError ,
2090- "MemoryAllocationFailed" );
2093+ {
2094+ xref = (MagickOffsetType * ) RelinquishMagickMemory (xref );
2095+ ThrowWriterException (ResourceLimitError ,
2096+ "MemoryAllocationFailed" );
2097+ }
20912098 pixels = (unsigned char * ) GetVirtualMemoryBlob (pixel_info );
20922099 /*
20932100 Dump Runlength encoded pixels.
You can’t perform that action at this time.
0 commit comments