From: dirk Date: Sat, 1 Mar 2014 19:08:11 +0000 (+0000) Subject: Fixed closing blob. X-Git-Tag: 7.0.1-0~2625 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=607010e33b6ca954bfd04575e78273953f1dc740;p=imagemagick Fixed closing blob. --- diff --git a/MagickCore/blob.c b/MagickCore/blob.c index 876a66f11..1083f0bae 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -1580,6 +1580,8 @@ MagickExport unsigned char *ImageToBlob(const ImageInfo *image_info, (void) FormatLocaleString(image->filename,MaxTextExtent,"%s:%s", image->magick,unique); status=WriteImage(blob_info,image,exception); + (void) CloseBlob(image); + (void) fclose(blob_info->file); if (status != MagickFalse) blob=FileToBlob(unique,~0UL,length,exception); } @@ -1833,9 +1835,8 @@ MagickExport unsigned char *ImagesToBlob(const ImageInfo *image_info, { (void) FormatLocaleString(filename,MaxTextExtent,"%s:%s", images->magick,unique); - images->blob->exempt=MagickTrue; - *images->filename='\0'; status=WriteImages(blob_info,images,filename,exception); + (void) CloseBlob(images); (void) fclose(blob_info->file); if (status != MagickFalse) blob=FileToBlob(unique,~0UL,length,exception);