if (svg_info->text != (char *) NULL)
svg_info->text=DestroyString(svg_info->text);
if (svg_info->scale != (double *) NULL)
- svg_info->scale=(double *) (svg_info->scale);
+ svg_info->scale=(double *) RelinquishMagickMemory(svg_info->scale);
if (svg_info->title != (char *) NULL)
svg_info->title=DestroyString(svg_info->title);
if (svg_info->comment != (char *) NULL)
/*
Parse SVG file.
*/
+ if (image == (Image *) NULL)
+ return((Image *) NULL);
svg_info=AcquireSVGInfo();
if (svg_info == (SVGInfo *) NULL)
- ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ {
+ (void) fclose(file);
+ ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ }
svg_info->file=file;
svg_info->exception=exception;
svg_info->image=image;
entry->blob_support=MagickFalse;
entry->seekable_stream=MagickFalse;
entry->description=ConstantString("Scalable Vector Graphics");
+ entry->mime_type=ConstantString("image/svg+xml");
if (*version != '\0')
entry->version=ConstantString(version);
entry->magick=(IsImageFormatHandler *) IsSVG;
entry->blob_support=MagickFalse;
entry->seekable_stream=MagickFalse;
entry->description=ConstantString("Compressed Scalable Vector Graphics");
+ entry->mime_type=ConstantString("image/svg+xml");
if (*version != '\0')
entry->version=ConstantString(version);
entry->magick=(IsImageFormatHandler *) IsSVG;