Skip to content

Commit

Permalink
Fixed issue reported in #780.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Sep 25, 2017
1 parent 14be5f7 commit 6017a80
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MagickCore/resample-private.h
Expand Up @@ -55,13 +55,16 @@ static inline ResampleFilter **AcquireResampleFilterThreadSet(
filter=(ResampleFilter **) AcquireQuantumMemory(number_threads,
sizeof(*filter));
if (filter == (ResampleFilter **) NULL)
return((ResampleFilter **) NULL);
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(filter,0,number_threads*sizeof(*filter));
for (i=0; i < (ssize_t) number_threads; i++)
{
filter[i]=AcquireResampleFilter(image,exception);
if (filter[i] == (ResampleFilter *) NULL)
return(DestroyResampleFilterThreadSet(filter));
{
filter=DestroyResampleFilterThreadSet(filter);
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
}
if (method != UndefinedVirtualPixelMethod)
(void) SetResampleFilterVirtualPixelMethod(filter[i],method);
if (interpolate != MagickFalse)
Expand Down

0 comments on commit 6017a80

Please sign in to comment.