Correctly reference count the hints hash
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sat, 16 Feb 2008 07:06:16 +0000 (07:06 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sat, 16 Feb 2008 07:06:16 +0000 (07:06 +0000)
p4raw-id: //depot/perl@33322

pp_ctl.c

index af08661..1dcca0b 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3564,7 +3564,10 @@ PP(pp_require)
 
     SAVEHINTS();
     PL_hints = 0;
-    PL_compiling.cop_hints_hash = NULL;
+    if (PL_compiling.cop_hints_hash) {
+       Perl_refcounted_he_free(aTHX_ PL_compiling.cop_hints_hash);
+       PL_compiling.cop_hints_hash = NULL;
+    }
 
     SAVECOMPILEWARNINGS();
     if (PL_dowarn & G_WARN_ALL_ON)