Fix the build and a fix mem leak.

We should consider setting msvc to /W4.

svn path=/trunk/; revision=40730
This commit is contained in:
Ged Murphy 2009-04-29 10:18:41 +00:00
parent a06899befa
commit 2c399da916
2 changed files with 5 additions and 4 deletions

View file

@ -16,7 +16,7 @@ Control(PMAIN_WND_INFO Info,
{
SC_HANDLE hSCManager;
SC_HANDLE hSc;
SERVICE_STATUS_PROCESS ServiceStatus;
SERVICE_STATUS_PROCESS ServiceStatus = {0};
SERVICE_STATUS Status;
DWORD BytesNeeded = 0;
BOOL bRet = FALSE;

View file

@ -197,8 +197,6 @@ static BOOL
DoInitDependsDialog(PSTOP_INFO pStopInfo,
HWND hDlg)
{
SC_HANDLE hSCManager;
SC_HANDLE hService;
LPENUM_SERVICE_STATUS lpDependencies;
DWORD dwCount;
LPTSTR lpPartialStr, lpStr;
@ -277,6 +275,10 @@ DoInitDependsDialog(PSTOP_INFO pStopInfo,
0,
(LPARAM)lpEnumServiceStatus->lpDisplayName);
}
HeapFree(ProcessHeap,
0,
lpDependencies);
}
}
@ -340,7 +342,6 @@ DoStop(PMAIN_WND_INFO pInfo)
STOP_INFO stopInfo;
SC_HANDLE hSCManager;
SC_HANDLE hService;
BOOL bHasDepends;
BOOL bRet = FALSE;
if (pInfo)