shell32: Fix memory leak in ApplicationAssociationRegistration_QueryCurrentDefault.

This commit is contained in:
Sebastian Lackner 2015-02-26 06:29:51 +01:00 committed by Alexandre Julliard
parent 3809c7a1bc
commit aba6a68068
1 changed files with 10 additions and 0 deletions

View File

@ -916,6 +916,11 @@ static HRESULT WINAPI ApplicationAssociationRegistration_QueryCurrentDefault(IAp
ret = RegGetValueW(hkey, NULL, NULL, RRF_RT_REG_SZ, &keytype, *association, &size);
if(ret == ERROR_SUCCESS)
hr = S_OK;
else
{
CoTaskMemFree(*association);
*association = NULL;
}
}
else
hr = E_OUTOFMEMORY;
@ -952,6 +957,11 @@ static HRESULT WINAPI ApplicationAssociationRegistration_QueryCurrentDefault(IAp
ret = RegGetValueW(hkey, path, propid, RRF_RT_REG_SZ, &keytype, *association, &size);
if(ret == ERROR_SUCCESS)
hr = S_OK;
else
{
CoTaskMemFree(*association);
*association = NULL;
}
}
else
hr = E_OUTOFMEMORY;