Commit 3d1e6fedb for imagemagick.org
commit 3d1e6fedb1dc04c53358d0660b61b761105eaec2
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Thu Feb 5 18:04:49 2026 +0100
Added missing calls to DestroyImageInfo.
diff --git a/coders/svg.c b/coders/svg.c
index f2ee42bdd..94bf77a0a 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -2667,11 +2667,13 @@ static void SVGEndElement(void *context,const xmlChar *name)
if (svg_info->url == (char*) NULL)
{
+ image_info=DestroyImageInfo(image_info);
(void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
break;
}
if (GetValueFromSplayTree(svg_tree,svg_info->url) != (const char *) NULL)
{
+ image_info=DestroyImageInfo(image_info);
(void) ThrowMagickException(svg_info->exception,GetMagickModule(),
DrawError,"VectorGraphicsNestedTooDeeply","`%s'",svg_info->url);
break;
@@ -2681,8 +2683,10 @@ static void SVGEndElement(void *context,const xmlChar *name)
(void) CopyMagickString(image_info->filename,svg_info->url,
MagickPathExtent);
image=ReadImage(image_info,svg_info->exception);
+ image_info=DestroyImageInfo(image_info);
if (image != (Image *) NULL)
image=DestroyImage(image);
+
(void) DeleteNodeFromSplayTree(svg_tree,svg_info->url);
(void) FormatLocaleFile(svg_info->file,
"image Over %g,%g %g,%g \"%s\"\n",svg_info->bounds.x,