mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:03:10 +00:00
[REGEXPL]
Fix memory leaks Fix broken if condition Use delete[] operator for allocations made with new[] operator Properly check for failed allocations by not throwing exception svn path=/trunk/; revision=54034
This commit is contained in:
parent
7e02fbd0dd
commit
c91f9ef382
16 changed files with 100 additions and 82 deletions
|
@ -138,7 +138,7 @@ int main ()
|
|||
|
||||
CArgumentParser Parser;
|
||||
|
||||
pSettings = new CSettings();
|
||||
pSettings = new (std::nothrow) CSettings();
|
||||
if (!pSettings)
|
||||
{
|
||||
_ftprintf(stderr,_T("Cannot initialize settings. Out of memory.\n"));
|
||||
|
@ -152,7 +152,7 @@ int main ()
|
|||
goto Abort;
|
||||
}
|
||||
|
||||
pPrompt = new CPrompt(Tree,hr);
|
||||
pPrompt = new (std::nothrow) CPrompt(Tree,hr);
|
||||
if (!pPrompt)
|
||||
{
|
||||
_ftprintf(stderr,_T("Cannot initialize prompt. Out of memory.\n"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue