Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/903
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Dec 19, 2017
1 parent 3c83167 commit 7a42f63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions MagickCore/cache.c
Expand Up @@ -1632,15 +1632,17 @@ static Cache GetImagePixelCache(Image *image,const MagickBooleanType clone,
clone_image.cache=ClonePixelCache(cache_info);
clone_info=(CacheInfo *) clone_image.cache;
status=OpenPixelCache(&clone_image,IOMode,exception);
if (status != MagickFalse)
if (status == MagickFalse)
clone_info=(CacheInfo *) DestroyPixelCache(clone_info);
else
{
if (clone != MagickFalse)
status=ClonePixelCacheRepository(clone_info,cache_info,
exception);
if (status != MagickFalse)
{
destroy=MagickTrue;
image->cache=clone_image.cache;
image->cache=clone_info;
}
}
RelinquishSemaphoreInfo(&clone_image.semaphore);
Expand Down
1 change: 0 additions & 1 deletion coders/png.c
Expand Up @@ -11302,7 +11302,6 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
if (pixel_info == (MemoryInfo *) NULL)
png_error(ping,"Allocation of memory for pixels failed");
ping_pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);

/*
Initialize image scanlines.
*/
Expand Down

0 comments on commit 7a42f63

Please sign in to comment.