Commit 35a6db86 authored by Richard Levitte's avatar Richard Levitte
Browse files

Close the implicitely opened registry key.

PR: 264
parent 56dc24d4
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -290,6 +290,15 @@ int RAND_poll(void)
			 */
			RAND_add(&length, sizeof(length), 0);
			RAND_add(buf, length, length / 4.0);

			/* Close the Registry Key to allow Windows to cleanup/close
			 * the open handle
			 * Note: The 'HKEY_PERFORMANCE_DATA' key is implicitly opened
			 *       when the RegQueryValueEx above is done.  However, if
			 *       it is not explicitly closed, it can cause disk
			 *       partition manipulation problems.
			 */
			RegCloseKey(HKEY_PERFORMANCE_DATA);
			}
		if (buf)
			free(buf);