diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-02-03 21:55:31 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-02-03 22:26:29 -0800 |
commit | bcb2959f085b571698ec9996d4671081cbc78e4c (patch) | |
tree | e805a09f951c5dbf6715582dd9fab51a398a2242 /universal.c | |
parent | 202e6ee2081e3a898537656cda1148d9aded394d (diff) | |
download | perl-bcb2959f085b571698ec9996d4671081cbc78e4c.tar.gz |
[perl #109762] Stop !$^V from leaking
by mortalising the temporary SVs.
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/universal.c b/universal.c index 463651bb73..b3c701540e 100644 --- a/universal.c +++ b/universal.c @@ -652,7 +652,13 @@ XS(XS_version_boolean) SP -= items; if (sv_isobject(ST(0)) && sv_derived_from(ST(0), "version")) { SV * const lobj = SvRV(ST(0)); - SV * const rs = newSViv( vcmp(lobj,new_version(newSVpvs("0"))) ); + SV * const rs = + newSViv( vcmp(lobj, + sv_2mortal(new_version( + sv_2mortal(newSVpvs("0")) + )) + ) + ); mPUSHs(rs); PUTBACK; return; |