From: Timo Sirainen Date: Mon, 9 Feb 2026 10:26:08 +0000 (+0200) Subject: lib-lua: Fix accesing freed memory if Lua script leaks passthrough event X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff7c94f369453b29f838641caf8bfb1bba83c475;p=thirdparty%2Fdovecot%2Fcore.git lib-lua: Fix accesing freed memory if Lua script leaks passthrough event Broken by a487559b11294c1c519a64dd42a970456e1493a0 --- diff --git a/src/lib-lua/dlua-dovecot.c b/src/lib-lua/dlua-dovecot.c index e5cea042b4..ebe2e89c82 100644 --- a/src/lib-lua/dlua-dovecot.c +++ b/src/lib-lua/dlua-dovecot.c @@ -490,7 +490,7 @@ void dlua_event_passthrough_abort(struct dlua_script *script) if (script->pending_event_passthrough != NULL) { struct event *event = script->pending_event_passthrough->event(); - const char *source_filename = event->source_filename; + const char *source_filename = t_strdup(event->source_filename); int source_linenum = event->source_linenum; event_send_abort(event); script->pending_event_passthrough = NULL;