diff options
Diffstat (limited to 'src/perl/perl-sources.c')
-rw-r--r-- | src/perl/perl-sources.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/perl/perl-sources.c b/src/perl/perl-sources.c index cedc472c..be1a4188 100644 --- a/src/perl/perl-sources.c +++ b/src/perl/perl-sources.c @@ -77,8 +77,9 @@ static int perl_source_event(PERL_SOURCE_REC *rec) SPAGAIN; if (SvTRUE(ERRSV)) { - signal_emit("script error", 2, rec->script, - SvPV(ERRSV, PL_na)); + char *error = g_strdup(SvPV(ERRSV, PL_na)); + signal_emit("script error", 2, rec->script, error); + g_free(error); } perl_source_unref(rec); |