summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-02-04 15:28:19 +0000
committerAaron Crane <arc@cpan.org>2017-02-04 15:28:47 +0000
commit7594f18f6aa16e16707d34a484c75a3e6c702b54 (patch)
tree985c004d3fa9e85e1c54a2ee476dd456b898b203 /pp_sys.c
parent35e5ce6797fbefd6230e2f09e14b4c55b1eeaab4 (diff)
downloadperl-7594f18f6aa16e16707d34a484c75a3e6c702b54.tar.gz
Fix memory leak in generating an exception message
This was my fault; oops.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 7c125b5137..9874107e06 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -960,7 +960,7 @@ PP(pp_tie)
/* If the glob doesn't name an existing package, using
* SVfARG(*MARK) would yield "*Foo::Bar" or *main::Foo. So
* generate the name for the error message explicitly. */
- SV *stashname = newSV(0);
+ SV *stashname = sv_2mortal(newSV(0));
gv_fullname4(stashname, (GV *) *MARK, NULL, FALSE);
DIE(aTHX_ "Can't locate object method \"%s\" via package \"%" SVf "\"",
methname, SVfARG(stashname));