Commit afcaf83e authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Correct a leaking hkey handle.

parent e197332f
......@@ -505,15 +505,22 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
r = RegQueryValueExW(hkey, szPackageCode, NULL, NULL,
(LPBYTE)squished, &sz);
if (r != ERROR_SUCCESS)
{
RegCloseKey(hkey);
return ERROR_UNKNOWN_PRODUCT;
}
unsquash_guid(squished, package);
*pcchValueBuf = strlenW(package);
if (strlenW(package) > *pcchValueBuf)
{
RegCloseKey(hkey);
return ERROR_MORE_DATA;
}
else
strcpyW(szBuffer, package);
RegCloseKey(hkey);
r = ERROR_SUCCESS;
}
else if (strcmpW(szAttribute, szVersionString)==0)
......
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