aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32.c
diff options
context:
space:
mode:
authorJason Rumney <[email protected]>2007-09-29 21:33:23 +0000
committerJason Rumney <[email protected]>2007-09-29 21:33:23 +0000
commit4da4d9bb7688ab848ca8f7038c40da2263303599 (patch)
tree6a4223d4a263c0d9150d02319f9aa4f7a5f9159a /src/w32.c
parentf7d4d4df90619729746357f104a3d8f9a759a36f (diff)
(w32_get_resource): Always close registry keys.
Diffstat (limited to 'src/w32.c')
-rw-r--r--src/w32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/w32.c b/src/w32.c
index eaad69010f..2b54f3d59d 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -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);
}