changeset 78919:87875c00eb06

(w32_get_resource): Always close registry keys.
author Jason Rumney <jasonr@gnu.org>
date Sat, 29 Sep 2007 21:33:23 +0000
parents 3e1267101550
children 28b71c901e03
files src/w32.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32.c	Sat Sep 29 16:23:03 2007 +0000
+++ b/src/w32.c	Sat Sep 29 21:33:23 2007 +0000
@@ -890,6 +890,7 @@
 	  && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
 	  && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
 	{
+          RegCloseKey (hrootkey);
 	  return (lpvalue);
 	}
 
@@ -906,6 +907,7 @@
 	  && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
 	  && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
 	{
+          RegCloseKey (hrootkey);
 	  return (lpvalue);
 	}