stop DEBUG_LEAKING_SCALARS, er, leaking!
authorDavid Mitchell <davem@iabyn.com>
Sun, 10 Oct 2010 18:48:23 +0000 (19:48 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 10 Oct 2010 23:41:17 +0000 (00:41 +0100)
When cloning an SV, new_SV() was setting sv_debug_file, then we
immediately set it again without freeing the first one.

sv.c

diff --git a/sv.c b/sv.c
index abb4f32..84f3ab1 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -11404,6 +11404,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
     dstr->sv_debug_line = sstr->sv_debug_line;
     dstr->sv_debug_inpad = sstr->sv_debug_inpad;
     dstr->sv_debug_parent = (SV*)sstr;
+    FREE_SV_DEBUG_FILE(dstr);
     dstr->sv_debug_file = savepv(sstr->sv_debug_file);
 #endif