]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 25 Jan 2014 23:09:10 +0000 (23:09 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 25 Jan 2014 23:09:10 +0000 (23:09 +0000)
MagickCore/blob.c

index 69195eb6586a42a52f7817ae3850d52cff821c57..cf6e8b49c9ddc099fad03ec7b3c1ebfe8b85d588 100644 (file)
@@ -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