diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2007-12-22 20:00:59 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2007-12-22 20:00:59 +0000 |
commit | 897c00dfc00f019b9bb8e0858bfd5592f9f76679 (patch) | |
tree | be13dc8e528f4b2a2e2a3e26df8bfceae7d2256e /support/win32 | |
parent | b3eb5d6c3977bc6e7cd40903e9a44267bd0187cd (diff) | |
download | httpd-897c00dfc00f019b9bb8e0858bfd5592f9f76679.tar.gz |
Solve service status handle leak on multi-service ApacheMonitor
instances, and disconnect computer function on multi-system
applications of ApacheMonitor.
PR: 33803
Reported by: K.W.Schick <drax sawebs.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@606481 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/win32')
-rw-r--r-- | support/win32/ApacheMonitor.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/support/win32/ApacheMonitor.c b/support/win32/ApacheMonitor.c index 296da05423..e39f9b8d98 100644 --- a/support/win32/ApacheMonitor.c +++ b/support/win32/ApacheMonitor.c @@ -193,15 +193,12 @@ void am_DisconnectComputer(LPSTR szComputerName) free(g_stComputers[i].szComputerName); RegCloseKey(g_stComputers[i].hRegistry); for (j = i; j < MAX_APACHE_COMPUTERS - 1; j++) { - g_stComputers[i].szComputerName= g_stComputers[i+1].szComputerName; - g_stComputers[i].hRegistry = g_stComputers[i+1].hRegistry; - } - for (i = j; i < MAX_APACHE_COMPUTERS; i++) { - g_stComputers[i].szComputerName = NULL; - g_stComputers[i].hRegistry = NULL; + g_stComputers[j].szComputerName= g_stComputers[j+1].szComputerName; + g_stComputers[j].hRegistry = g_stComputers[j+1].hRegistry; } + g_stComputers[j].szComputerName = NULL; + g_stComputers[j].hRegistry = NULL; } - } @@ -1055,8 +1052,8 @@ BOOL GetApacheServicesStatus() } } ++computers; + RegCloseKey(hKey); } - RegCloseKey(hKey); FindRunningServices(); return TRUE; } |