[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:
Pierre Schweitzer 2011-10-06 21:36:10 +00:00
parent 7e02fbd0dd
commit c91f9ef382
16 changed files with 100 additions and 82 deletions

View file

@ -147,7 +147,7 @@ CheckValueArgument:
return 0;
}
TCHAR *pszValueName = new TCHAR[dwMaxValueNameLength];
TCHAR *pszValueName = new (std::nothrow) TCHAR[dwMaxValueNameLength];
if (!pszValueName)
{
rConsole.Write("Out of memory.");