HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f7d4d4d
)
(w32_get_resource): Always close registry keys.
author
Jason Rumney
<jasonr@gnu.org>
Sat, 29 Sep 2007 21:33:23 +0000
(21:33 +0000)
committer
Jason Rumney
<jasonr@gnu.org>
Sat, 29 Sep 2007 21:33:23 +0000
(21:33 +0000)
src/w32.c
patch
|
blob
|
blame
|
history
diff --git
a/src/w32.c
b/src/w32.c
index
eaad690
..
2b54f3d
100644
(file)
--- 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);
}