summaryrefslogtreecommitdiff
path: root/src/perl/perl-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/perl/perl-core.c')
-rw-r--r--src/perl/perl-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c
index 7af06f89..966c9b4f 100644
--- a/src/perl/perl-core.c
+++ b/src/perl/perl-core.c
@@ -242,8 +242,11 @@ static int perl_script_eval(PERL_SCRIPT_REC *script)
if (error != NULL) {
if (*error == '\0')
error = NULL;
- else
+ else {
+ error = g_strdup(error);
signal_emit("script error", 2, script, error);
+ g_free(error);
+ }
}
PUTBACK;