-fix a memory leak

svn path=/trunk/; revision=27529
This commit is contained in:
Christoph von Wittich 2007-07-09 01:52:35 +00:00
parent e392256c32
commit 972c5d1754
2 changed files with 3 additions and 2 deletions

View file

@ -1225,7 +1225,7 @@ done:;
else
{
/* Release the display name buffer */
if (lpService->lpServiceName != lpService->lpDisplayName)
if (lpService->lpServiceName != NULL)
HeapFree(GetProcessHeap(), 0, lpService->lpDisplayName);
if (hServiceHandle != NULL)

View file

@ -369,7 +369,8 @@ WinMain(HINSTANCE hInstance,
#if 1
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
WaitForSingleObject(hEvent, INFINITE);
if (hEvent)
WaitForSingleObject(hEvent, INFINITE);
#else
for (;;)
{