From: cristy Date: Sat, 25 Jan 2014 23:09:10 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2790 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a7eb379fddcd1f359bce49d5abad201229ee86c;p=imagemagick --- diff --git a/MagickCore/blob.c b/MagickCore/blob.c index 69195eb65..cf6e8b49c 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -1547,15 +1547,13 @@ MagickExport unsigned char *ImageToBlob(const ImageInfo *image_info, image->blob->exempt=MagickTrue; *image->filename='\0'; status=WriteImage(blob_info,image,exception); + *length=image->blob->length; blob=DetachBlob(image->blob); if (status == MagickFalse) blob=(unsigned char *) RelinquishMagickMemory(blob); else - { - *length=image->blob->length; - blob=(unsigned char *) ResizeQuantumMemory(blob,*length+1, - sizeof(*blob)); - } + blob=(unsigned char *) ResizeQuantumMemory(blob,*length+1, + sizeof(*blob)); } } else @@ -1804,15 +1802,13 @@ MagickExport unsigned char *ImagesToBlob(const ImageInfo *image_info, images->blob->exempt=MagickTrue; *images->filename='\0'; status=WriteImages(blob_info,images,images->filename,exception); + *length=images->blob->length; blob=DetachBlob(images->blob); if (status == MagickFalse) blob=(unsigned char *) RelinquishMagickMemory(blob); else - { - *length=images->blob->length; - blob=(unsigned char *) ResizeQuantumMemory(blob,*length+1, - sizeof(*blob)); - } + blob=(unsigned char *) ResizeQuantumMemory(blob,*length+1, + sizeof(*blob)); } } else