Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,12 @@ bool CVersionInfo::GetModuleVersionInfo(HMODULE hMod) {
modFileName = new TCHAR[MAX_PATH];
retVal = GetModuleFileName(hMod, modFileName, MAX_PATH);
if (!retVal) {
delete modFileName;
delete[] modFileName;
::WriteToLog(L"CLog::GetModuleVersion - Error while getting module filename...");
return false;
}
retVal = GetModuleVersionInfo(modFileName);
delete modFileName;
delete[] modFileName;
return (retVal == TRUE);
}

Expand Down Expand Up @@ -413,7 +413,7 @@ bool CVersionInfo::GetModuleVersionInfo(LPTSTR modName = NULL) {
if (retVal)
this->g_bVerInfoBuff = buff;
else
if (buff) delete buff;
delete[] buff;

return (retVal == TRUE);
}
Expand Down
4 changes: 2 additions & 2 deletions stdafx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool FileExists(LPTSTR fileName) {
h = FindFirstFile(searchPath, &wfData);
if (colonPtr) colonPtr[0] = ':';
if (h != INVALID_HANDLE_VALUE) {
delete searchPath;
delete[] searchPath;
FindClose(h);
return true;
}
Expand All @@ -117,7 +117,7 @@ bool FileExists(LPTSTR fileName) {
}
wcscat_s(searchPath, strMaxSize, L"*.*");
h = FindFirstFile(searchPath, &wfData);
delete searchPath;
delete[] searchPath;
if (h != INVALID_HANDLE_VALUE) {
FindClose(h);
return true;
Expand Down