[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);
HeapFree(ProcessHeap,
0,
lpSuccess);
LocalFree(lpSuccess);
}
CloseServiceHandle(hSc);

View file

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

View file

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

View file

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

View file

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

View file

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