}
}
RelinquishMagickResource(DiskResource,cache_info->length);
+ cache_info->type=UndefinedCache;
(void) ThrowMagickException(exception,GetMagickModule(),CacheError,
"CacheResourcesExhausted","`%s'",image->filename);
return(MagickFalse);
if (OpenPixelCacheOnDisk(cache_info,mode) == MagickFalse)
{
RelinquishMagickResource(DiskResource,cache_info->length);
+ cache_info->type=UndefinedCache;
ThrowFileException(exception,CacheError,"UnableToOpenPixelCache",
image->filename);
return(MagickFalse);
cache_info->length);
if (status == MagickFalse)
{
+ cache_info->type=UndefinedCache;
ThrowFileException(exception,CacheError,"UnableToExtendCache",
image->filename);
return(MagickFalse);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",
message);
}
+ if (status == MagickFalse)
+ cache_info->type=UndefinedCache;
return(status);
}
}
cache_info->number_channels,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",message);
}
+ if (status == MagickFalse)
+ cache_info->type=UndefinedCache;
return(status);
}
\f
clone_image->colormap=(PixelInfo *) AcquireQuantumMemory(length,
sizeof(*clone_image->colormap));
if (clone_image->colormap == (PixelInfo *) NULL)
- ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
+ {
+ clone_image=DestroyImage(clone_image);
+ ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
+ }
(void) CopyMagickMemory(clone_image->colormap,image->colormap,length*
sizeof(*clone_image->colormap));
}