fix memory leak in C<sub f { split ' ', "a b" } f() while 1>
Gurusamy Sarathy [Wed, 8 Sep 1999 00:53:50 +0000 (00:53 +0000)]
p4raw-id: //depot/perl@4103

pp.c

diff --git a/pp.c b/pp.c
index 4d96370..23510eb 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -4870,6 +4870,7 @@ PP(pp_split)
        else {
            if (!AvREAL(ary)) {
                AvREAL_on(ary);
+               AvREIFY_off(ary);
                for (i = AvFILLp(ary); i >= 0; i--)
                    AvARRAY(ary)[i] = &PL_sv_undef;     /* don't free mere refs */
            }