Memory leak.

delete[] memory returned by nsString::ToNewCString.


git-svn-id: svn://10.0.0.236/trunk@23167 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ramiro%netscape.com 1999-03-08 11:38:59 +00:00
parent e1c07957a0
commit bdfb92b7b9

View File

@ -129,7 +129,14 @@ NS_IMETHODIMP nsXULCommand::DoCommand()
mWebShell->GetName( &name);
nsAutoString str(name);
if (DEBUG_MENUSDEL) printf("DoCommand - mWebShell is [%s] 0x%x\n", str.ToNewCString(), mWebShell);
if (DEBUG_MENUSDEL)
{
char * cstr = str.ToNewCString();
printf("DoCommand - mWebShell is [%s] 0x%x\n",cstr, mWebShell);
if (cstr) delete [] cstr;
}
return ExecuteJavaScriptString(mWebShell, mCommandStr);
}