possible memleak during onload bu pZNCSpace not being mortal

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@986 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
imaginos
2008-03-17 19:51:58 +00:00
parent 322483ab8e
commit ed15b68684

View File

@@ -1009,11 +1009,13 @@ bool CModPerl::OnLoad( const CString & sArgs, CString & sMessage )
// this sets up the eval CB that we call from here on out. this way we can grab the error produced
SetupZNCScript();
HV *pZNCSpace = get_hv ( "ZNC::", TRUE);
HV *pZNCSpace = get_hv( "ZNC::", TRUE);
if ( !pZNCSpace )
return( false );
sv_2mortal((SV*)pZNCSpace);
newCONSTSUB( pZNCSpace, "CONTINUE", newSViv( CONTINUE ) );
newCONSTSUB( pZNCSpace, "HALT", newSViv( HALT ) );
newCONSTSUB( pZNCSpace, "HALTMODS", newSViv( HALTMODS ) );