1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

fix recursive crash in Perl scripts

This commit is contained in:
Ailin Nemui 2021-08-13 17:32:09 +02:00
parent 425178e793
commit ed23d89a5a
2 changed files with 2 additions and 0 deletions

View File

@ -419,6 +419,7 @@ static void perl_call_signal(PERL_SCRIPT_REC *script, SV *func,
if (SvTRUE(ERRSV)) { if (SvTRUE(ERRSV)) {
char *error = g_strdup(SvPV_nolen(ERRSV)); char *error = g_strdup(SvPV_nolen(ERRSV));
perl_signal_remove_script(script);
signal_emit("script error", 2, script, error); signal_emit("script error", 2, script, error);
g_free(error); g_free(error);
rec = NULL; rec = NULL;

View File

@ -83,6 +83,7 @@ static int perl_source_event(PERL_SOURCE_REC *rec)
if (SvTRUE(ERRSV)) { if (SvTRUE(ERRSV)) {
char *error = g_strdup(SvPV_nolen(ERRSV)); char *error = g_strdup(SvPV_nolen(ERRSV));
perl_source_remove_script(rec->script);
signal_emit("script error", 2, rec->script, error); signal_emit("script error", 2, rec->script, error);
g_free(error); g_free(error);
} }