From a846719b9cd548d3e7e09475e3f33d8ef4101412 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Fri, 10 May 2024 11:21:11 +0200 Subject: [PATCH] pattern: Fix memory leak xmlCompileStepPattern --- pattern.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pattern.c b/pattern.c index 6cb48987..d03d3793 100644 --- a/pattern.c +++ b/pattern.c @@ -1242,6 +1242,8 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) { if (CUR == '@') { NEXT; xmlCompileAttributeTest(ctxt); + if (ctxt->error != 0) + goto error; SKIP_BLANKS; /* TODO: check for incompleteness */ if (CUR != 0) {