aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2007-09-29 21:33:23 +0000
committerJason Rumney2007-09-29 21:33:23 +0000
commit4da4d9bb7688ab848ca8f7038c40da2263303599 (patch)
tree6a4223d4a263c0d9150d02319f9aa4f7a5f9159a /src
parentf7d4d4df90619729746357f104a3d8f9a759a36f (diff)
downloademacs-4da4d9bb7688ab848ca8f7038c40da2263303599.tar.gz
emacs-4da4d9bb7688ab848ca8f7038c40da2263303599.zip
(w32_get_resource): Always close registry keys.
Diffstat (limited to 'src')
-rw-r--r--src/w32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/w32.c b/src/w32.c
index eaad69010f8..2b54f3d59dc 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -890,6 +890,7 @@ w32_get_resource (key, lpdwtype)
890 && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL 890 && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
891 && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS) 891 && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
892 { 892 {
893 RegCloseKey (hrootkey);
893 return (lpvalue); 894 return (lpvalue);
894 } 895 }
895 896
@@ -906,6 +907,7 @@ w32_get_resource (key, lpdwtype)
906 && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL 907 && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
907 && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS) 908 && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
908 { 909 {
910 RegCloseKey (hrootkey);
909 return (lpvalue); 911 return (lpvalue);
910 } 912 }
911 913