SV *sv = GvSV(gv);
if (!sv_derived_from(PL_patchlevel, "version"))
(void *)upg_version(PL_patchlevel);
- sv = vnumify(PL_patchlevel);
- SvREADONLY_on(sv);
- GvSV(gv) = sv;
+ GvSV(gv) = vnumify(PL_patchlevel);
+ SvREADONLY_on(GvSV(gv));
+ SvREFCNT_dec(sv);
}
break;
case '\026': /* $^V */