summaryrefslogtreecommitdiff
path: root/src/perl/common
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2016-09-13 17:11:05 +0200
committerLemonBoy <thatlemon@gmail.com>2016-09-13 17:11:05 +0200
commit21539019dd46ec88a3369b53cc0069b372c6d7d1 (patch)
tree70baff49e50b54cbd6ab3ed0d051480fae901b0c /src/perl/common
parentd2c5939de0e875806d07cce4753ccc1a10ac6252 (diff)
downloadirssi-21539019dd46ec88a3369b53cc0069b372c6d7d1.zip
Make sure to make a copy of ERRSV content.
Otherwise we might end up showing an empty message. Fixes #522.
Diffstat (limited to 'src/perl/common')
-rw-r--r--src/perl/common/Expando.xs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/perl/common/Expando.xs b/src/perl/common/Expando.xs
index bb5d185b..26800b05 100644
--- a/src/perl/common/Expando.xs
+++ b/src/perl/common/Expando.xs
@@ -85,7 +85,9 @@ static char *perl_expando_event(PerlExpando *rec, SERVER_REC *server,
script_unregister_expandos(script);
/* rec has been freed now */
- signal_emit("script error", 2, script, SvPV_nolen(ERRSV));
+ char *error = g_strdup(SvPV_nolen(ERRSV));
+ signal_emit("script error", 2, script, error);
+ g_free(error);
} else if (retcount > 0) {
ret = g_strdup(POPp);
*free_ret = TRUE;