mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 17:38:11 +00:00
[MSCTF]
Fix memory leaks.
Already sent & committed upstream: f566f38e2f
svn path=/trunk/; revision=54609
This commit is contained in:
parent
f8a5a5e7ba
commit
7da8d18879
2 changed files with 9 additions and 0 deletions
|
@ -1013,7 +1013,10 @@ static HRESULT WINAPI TextStoreACPSink_OnLockGranted(ITextStoreACPSink *iface,
|
|||
|
||||
sinkcookie = HeapAlloc(GetProcessHeap(),0,sizeof(EditCookie));
|
||||
if (!sinkcookie)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, cookie);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
cookie->lockType = dwLockFlags;
|
||||
cookie->pOwningContext = This->pContext;
|
||||
|
|
|
@ -924,7 +924,10 @@ static HRESULT ProfilesEnumGuid_Constructor(IEnumGUID **ppOut)
|
|||
|
||||
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szwSystemTIPKey, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &This->key, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TRACE("returning %p\n", This);
|
||||
*ppOut = (IEnumGUID*)This;
|
||||
|
@ -1161,7 +1164,10 @@ static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguage
|
|||
|
||||
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szwSystemTIPKey, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &This->tipkey, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TRACE("returning %p\n", This);
|
||||
*ppOut = (IEnumTfLanguageProfiles*)This;
|
||||
|
|
Loading…
Reference in a new issue