Author: gedmurphy
Date: Wed Apr 29 14:18:41 2009
New Revision: 40730
URL:
http://svn.reactos.org/svn/reactos?rev=40730&view=rev
Log:
Fix the build and a fix mem leak.
We should consider setting msvc to /W4.
Modified:
trunk/reactos/base/applications/mscutils/servman/control.c
trunk/reactos/base/applications/mscutils/servman/stop.c
Modified: trunk/reactos/base/applications/mscutils/servman/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/control.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/servman/control.c [iso-8859-1] Wed Apr 29
14:18:41 2009
@@ -16,7 +16,7 @@
{
SC_HANDLE hSCManager;
SC_HANDLE hSc;
- SERVICE_STATUS_PROCESS ServiceStatus;
+ SERVICE_STATUS_PROCESS ServiceStatus = {0};
SERVICE_STATUS Status;
DWORD BytesNeeded = 0;
BOOL bRet = FALSE;
Modified: trunk/reactos/base/applications/mscutils/servman/stop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/stop.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/servman/stop.c [iso-8859-1] Wed Apr 29
14:18:41 2009
@@ -197,8 +197,6 @@
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 @@
0,
(LPARAM)lpEnumServiceStatus->lpDisplayName);
}
+
+ HeapFree(ProcessHeap,
+ 0,
+ lpDependencies);
}
}
@@ -340,7 +342,6 @@
STOP_INFO stopInfo;
SC_HANDLE hSCManager;
SC_HANDLE hService;
- BOOL bHasDepends;
BOOL bRet = FALSE;
if (pInfo)