fix build warning and a memory leak
This commit is contained in:
parent
c6b3bb1243
commit
191e14b276
|
|
@ -66,6 +66,13 @@ public:
|
|||
delete m_pFileWatcher;
|
||||
m_pFileWatcher = NULL;
|
||||
}
|
||||
|
||||
if(m_pHttp502ErrorPage != NULL)
|
||||
{
|
||||
delete m_pHttp502ErrorPage;
|
||||
m_pHttp502ErrorPage = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FILE_WATCHER*
|
||||
|
|
|
|||
|
|
@ -151,6 +151,10 @@ APPLICATION_MANAGER::Get502ErrorPage(
|
|||
pHttp502ErrorPage->FromMemory.pBuffer = (PVOID)m_pstrErrorInfo;
|
||||
|
||||
pHttp502ErrorPage->FromMemory.BufferLength = (ULONG)strnlen(m_pstrErrorInfo, maxsize); //(ULONG)(wcslen(m_pstrErrorInfo)); // *sizeof(WCHAR);
|
||||
if(m_pHttp502ErrorPage != NULL)
|
||||
{
|
||||
delete m_pHttp502ErrorPage;
|
||||
}
|
||||
m_pHttp502ErrorPage = pHttp502ErrorPage;
|
||||
*ppErrorPage = m_pHttp502ErrorPage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ SERVER_PROCESS::StartProcess(
|
|||
WCHAR* pszPath = NULL;
|
||||
WCHAR pszFullPath[_MAX_PATH];
|
||||
LPCWSTR apsz[1];
|
||||
PCWSTR pszAppPath = NULL;
|
||||
PCWSTR pszAppPath = NULL;
|
||||
|
||||
GetStartupInfoW(&startupInfo);
|
||||
|
||||
|
|
@ -457,8 +457,11 @@ SERVER_PROCESS::StartProcess(
|
|||
while (*(pszCurrentEnvironment + dwCurrentEnvSize++) != 0);
|
||||
} while (*(pszCurrentEnvironment + dwCurrentEnvSize++) != 0);
|
||||
|
||||
mszNewEnvironment.Append(pszCurrentEnvironment, dwCurrentEnvSize + 1 );
|
||||
|
||||
DBG_ASSERT(dwCurrentEnvSize > 0);
|
||||
//
|
||||
// environment block ends with \0\0, we don't want include the last \0 for appending
|
||||
//
|
||||
mszNewEnvironment.Append(pszCurrentEnvironment, dwCurrentEnvSize-1 );
|
||||
|
||||
dwCreationFlags = CREATE_NO_WINDOW |
|
||||
CREATE_UNICODE_ENVIRONMENT |
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
|
||||
#pragma warning (disable : 4267)
|
||||
|
||||
#include "precomp.h"
|
||||
#include "multisz.h"
|
||||
#include <tchar.h>
|
||||
|
|
@ -467,3 +470,5 @@ Finished:
|
|||
|
||||
return hr;
|
||||
}
|
||||
|
||||
#pragma warning(default:4267)
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
#pragma warning (disable : 4267)
|
||||
#include "precomp.h"
|
||||
#include "multisza.h"
|
||||
#include <tchar.h>
|
||||
|
|
@ -404,3 +405,4 @@ Finished:
|
|||
|
||||
return hr;
|
||||
}
|
||||
#pragma warning(default:4267)
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
#pragma warning (disable : 4267)
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
STRU::STRU(
|
||||
|
|
@ -1265,3 +1267,5 @@ Exit:
|
|||
|
||||
return hr;
|
||||
}
|
||||
|
||||
#pragma warning(default:4267)
|
||||
|
|
|
|||
Loading…
Reference in New Issue