[SERVMAN]

- Call LocalFree() to free memory allocated with LocalAlloc()
- Fix leak

CID #716291
CID #1101891
CID #1101892
CID #1101893
CID #1101894
CID #1101895
CID #1101896

svn path=/trunk/; revision=62638
This commit is contained in:
Pierre Schweitzer 2014-04-05 22:31:19 +00:00
parent 28313aeb0c
commit 9300d44ca7
6 changed files with 8 additions and 18 deletions

View file

@ -65,9 +65,7 @@ DoCreate(PCREATE_DATA Data)
{ {
DisplayString(lpSuccess); DisplayString(lpSuccess);
HeapFree(ProcessHeap, LocalFree(lpSuccess);
0,
lpSuccess);
} }
CloseServiceHandle(hSc); CloseServiceHandle(hSc);

View file

@ -38,9 +38,7 @@ DoDeleteService(PMAIN_WND_INFO Info,
{ {
DisplayString(lpSuccess); DisplayString(lpSuccess);
HeapFree(ProcessHeap, LocalFree(lpSuccess);
0,
lpSuccess);
} }
bRet = TRUE; bRet = TRUE;

View file

@ -163,9 +163,7 @@ TV1_AddDependantsToTree(PSERVICEPROPSHEET pDlgInfo,
0, 0,
FALSE); FALSE);
HeapFree(ProcessHeap, LocalFree(lpNoDepends);
0,
lpNoDepends);
/* Disable the window */ /* Disable the window */
EnableWindow(pDlgInfo->hDependsTreeView1, FALSE); EnableWindow(pDlgInfo->hDependsTreeView1, FALSE);

View file

@ -41,6 +41,8 @@ TV2_HasDependantServices(LPWSTR lpServiceName)
bRet = TRUE; bRet = TRUE;
} }
} }
CloseServiceHandle(hService);
} }
CloseServiceHandle(hSCManager); CloseServiceHandle(hSCManager);
@ -163,9 +165,7 @@ TV2_AddDependantsToTree(PSERVICEPROPSHEET pDlgInfo,
0, 0,
FALSE); FALSE);
HeapFree(ProcessHeap, LocalFree(lpNoDepends);
0,
lpNoDepends);
/* Disable the window */ /* Disable the window */
EnableWindow(pDlgInfo->hDependsTreeView2, FALSE); EnableWindow(pDlgInfo->hDependsTreeView2, FALSE);

View file

@ -192,9 +192,7 @@ ChangeListViewText(PMAIN_WND_INFO Info,
lvItem.iItem, lvItem.iItem,
(LPARAM)&lvItem); (LPARAM)&lvItem);
HeapFree(ProcessHeap, LocalFree(lpStartup);
0,
lpStartup);
HeapFree(ProcessHeap, HeapFree(ProcessHeap,
0, 0,
lpServiceConfig); lpServiceConfig);

View file

@ -238,9 +238,7 @@ DoInitDependsDialog(PMAIN_WND_INFO pInfo,
bRet = TRUE; bRet = TRUE;
} }
HeapFree(ProcessHeap, LocalFree(lpPartialStr);
0,
lpPartialStr);
} }
/* Display the list of services which need stopping */ /* Display the list of services which need stopping */