diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-08-06 10:06:46 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-08-06 10:06:46 +0000 |
commit | f9be5ac81a1b4bd2859cd05fa3a616e17a46b37c (patch) | |
tree | 862135e71f979f3d2cab07dd2044a46165356df3 /util.c | |
parent | da6068d9464c1a68418e75b8bfb0a470c97eb9ba (diff) | |
download | perl-f9be5ac81a1b4bd2859cd05fa3a616e17a46b37c.tar.gz |
remove leaks associated with version object change #23190
p4raw-link: @23190 on //depot/perl: d7aa53827cc12fdf8a697328df844e16aaa58287
p4raw-id: //depot/perl@23198
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3887,6 +3887,7 @@ Perl_scan_version(pTHX_ char *s, SV *rv, bool qv) bool saw_under = 0; SV* sv = newSVrv(rv, "version"); /* create an SV and upgrade the RV */ (void)sv_upgrade(sv, SVt_PVAV); /* needs to be an AV type */ + AvREAL_on((AV*)sv); /* pre-scan the imput string to check for decimals */ while ( *pos == '.' || *pos == '_' || isDIGIT(*pos) ) @@ -4010,6 +4011,7 @@ Perl_new_version(pTHX_ SV *ver) AV *av = (AV *)SvRV(ver); SV* sv = newSVrv(rv, "version"); /* create an SV and upgrade the RV */ (void)sv_upgrade(sv, SVt_PVAV); /* needs to be an AV type */ + AvREAL_on((AV*)sv); for ( key = 0; key <= av_len(av); key++ ) { I32 rev = SvIV(*av_fetch(av, key, FALSE)); |