From: Jason Rumney Date: Sat, 29 Sep 2007 21:33:23 +0000 (+0000) Subject: (w32_get_resource): Always close registry keys. X-Git-Tag: emacs-pretest-22.1.90~717 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4da4d9bb7688ab848ca8f7038c40da2263303599;p=emacs.git (w32_get_resource): Always close registry keys. --- 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); }