Commit aba6a680 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

shell32: Fix memory leak in ApplicationAssociationRegistration_QueryCurrentDefault.

parent 3809c7a1
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment