Commit 4da4d9bb authored by Jason Rumney's avatar Jason Rumney
Browse files

(w32_get_resource): Always close registry keys.

parent f7d4d4df
......@@ -890,6 +890,7 @@ w32_get_resource (key, lpdwtype)
&& (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
&& RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
{
RegCloseKey (hrootkey);
return (lpvalue);
}
......@@ -906,6 +907,7 @@ w32_get_resource (key, lpdwtype)
&& (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
&& RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
{
RegCloseKey (hrootkey);
return (lpvalue);
}
......
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