diff options
author | Jason Rumney <[email protected]> | 2007-09-29 21:33:23 +0000 |
---|---|---|
committer | Jason Rumney <[email protected]> | 2007-09-29 21:33:23 +0000 |
commit | 4da4d9bb7688ab848ca8f7038c40da2263303599 (patch) | |
tree | 6a4223d4a263c0d9150d02319f9aa4f7a5f9159a /src/w32.c | |
parent | f7d4d4df90619729746357f104a3d8f9a759a36f (diff) |
(w32_get_resource): Always close registry keys.
Diffstat (limited to 'src/w32.c')
-rw-r--r-- | src/w32.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); } |