From: cristy Date: Tue, 31 Jan 2012 16:02:29 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6280 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd20d2bc5d5d2949e441f58b5d3cff57195aff77;p=imagemagick --- diff --git a/MagickCore/constitute.c b/MagickCore/constitute.c index 6014519cc..b6a9a7e3e 100644 --- a/MagickCore/constitute.c +++ b/MagickCore/constitute.c @@ -1199,7 +1199,10 @@ MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info, */ status=OpenBlob(write_info,image,ReadBinaryBlobMode,exception); if (status != MagickFalse) - status=ImageToFile(image,write_info->filename,exception); + { + (void) RelinquishUniqueFileResource(write_info->filename); + status=ImageToFile(image,write_info->filename,exception); + } (void) CloseBlob(image); (void) RelinquishUniqueFileResource(image->filename); (void) CopyMagickString(image->filename,write_info->filename,