From 4da4d9bb7688ab848ca8f7038c40da2263303599 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 29 Sep 2007 21:33:23 +0000 Subject: [PATCH] (w32_get_resource): Always close registry keys. --- src/w32.c | 2 ++ 1 file changed, 2 insertions(+) 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) && (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); } -- 2.39.2