Skip to content

Commit

Permalink
Avoid 2nd potential XQuery trigger leak
Browse files Browse the repository at this point in the history
We may leak trigger states to thread local which can potentially occur when
the specified XQueryTrigger library module is not available in the database

Closes eXist-db#5459
  • Loading branch information
alanpaxton authored and adamretter committed Oct 8, 2024
1 parent ce795bf commit 9e2d613
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ private void execute(final TriggerPhase phase, final TriggerEvent event, final D
compiledQuery = getScript(broker, transaction);
if (compiledQuery == null) {
// NOTE: can occur if there is no such XQueryTrigger library module available in the database
TriggerStatePerThread.clearIfFinished(phase);
return;
}
} catch (final TriggerException e) {
Expand Down

0 comments on commit 9e2d613

Please sign in to comment.