Commit 7e63bb505 for imagemagick.org

commit 7e63bb505b63a0aba5029b451146140564d83f6e
Author: Dirk Lemstra <dirk@lemstra.org>
Date:   Sun Feb 8 14:03:30 2026 +0100

    Moved allocation to fix possible memory leak when at recursion depth.

diff --git a/coders/msl.c b/coders/msl.c
index 3fe57c0d1..b3262916c 100644
--- a/coders/msl.c
+++ b/coders/msl.c
@@ -357,7 +357,6 @@ static void MSLStartElement(void *context,const xmlChar *tag,
   */
   (void) LogMagickEvent(CoderEvent,GetMagickModule(),
     "  SAX.startElement(%s",tag);
-  exception=AcquireExceptionInfo();
   parser=(xmlParserCtxtPtr) context;
   msl_info=(MSLInfo *) parser->_private;
   if (msl_info->depth++ >= MagickMaxRecursionDepth)
@@ -367,6 +366,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
       xmlStopParser((xmlParserCtxtPtr) context);
       return;
     }
+  exception=AcquireExceptionInfo();
   n=msl_info->n;
   keyword=(const char *) NULL;
   value=(char *) NULL;