mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Memory leak.
delete[] memory returned by nsString::ToNewCString.
This commit is contained in:
parent
aea0f271b0
commit
61be65aad6
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user