]> git.vpit.fr Git - perl/modules/indirect.git/commitdiff
Stop leaking the package name passed to the hook
authorVincent Pit <vince@profvince.com>
Sat, 23 May 2009 22:32:22 +0000 (00:32 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 23 May 2009 22:32:22 +0000 (00:32 +0200)
indirect.xs

index 86675c854bb308199163930de6de3db224537390..896ae7f591338b40e75a0d06e33940aea9af135c 100644 (file)
@@ -521,19 +521,19 @@ STATIC OP *indirect_ck_entersub(pTHX_ OP *o) {
     line_t  line;
     dSP;
 
+    ENTER;
+    SAVETMPS;
+
     onamesv = sv_mortalcopy(onamesv);
     mnamesv = sv_mortalcopy(mnamesv);
 
 #ifdef USE_ITHREADS
-    file = newSVpv(CopFILE(&PL_compiling), 0);
+    file = sv_2mortal(newSVpv(CopFILE(&PL_compiling), 0));
 #else
     file = sv_mortalcopy(CopFILESV(&PL_compiling));
 #endif
     line = CopLINE(&PL_compiling);
 
-    ENTER;
-    SAVETMPS;
-
     PUSHMARK(SP);
     EXTEND(SP, 4);
     PUSHs(onamesv);