Subject: | char * leak if fatal warnings are on and misc in Perl_upg_version |
In Perl_upg_version at https://bitbucket.org/jpeacock/version/src/9f49d95d787c38ad5b6fcdab71f1ce7c95a1b3d3/vutil/vutil.c?at=default#cl-662 a warning check is done, if fatal warnings are on, "Safefree(version);" will never be called. Probably save stack should be used instead. Also same style leak at https://bitbucket.org/jpeacock/version/src/9f49d95d787c38ad5b6fcdab71f1ce7c95a1b3d3/vutil/vutil.c?at=default#cl-662 .
Another issue, I'm not sure what your policy is on GETMAGIC, but at https://bitbucket.org/jpeacock/version/src/9f49d95d787c38ad5b6fcdab71f1ce7c95a1b3d3/vutil/vutil.c?at=default#cl-662 (" if ( SvNOK(ver) && !( SvPOK(ver) && sv_len(ver) == 3 ) )") flags are checked before any get magic call. Also on that line, why is sv_len (a function) called instead of SvCUR (a function call free macro) if its SvPOK?