diff options
author | ivan <ivan@13f79535-47bb-0310-9956-ffa450edef68> | 2019-06-11 16:39:38 +0000 |
---|---|---|
committer | ivan <ivan@13f79535-47bb-0310-9956-ffa450edef68> | 2019-06-11 16:39:38 +0000 |
commit | dc16eb559973ea5349ae81baf1d64b33bbd8c15f (patch) | |
tree | 33484efc6bf57116d36c11f1af374c16505ba4fe /misc | |
parent | e73e290393284c656577264ec959e1abbd12f756 (diff) | |
download | libapr-dc16eb559973ea5349ae81baf1d64b33bbd8c15f.tar.gz |
* misc/win32/misc.c
(apr_get_oslevel): Do not use static variables to protect from potential
race condition.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1861046 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r-- | misc/win32/misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/win32/misc.c b/misc/win32/misc.c index 5ded3fed9..2b38a4aa5 100644 --- a/misc/win32/misc.c +++ b/misc/win32/misc.c @@ -27,7 +27,7 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level) { if (apr_os_level == APR_WIN_UNK) { - static OSVERSIONINFO oslev; + OSVERSIONINFO oslev; oslev.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if (!GetVersionEx(&oslev)) { return apr_get_os_error(); @@ -35,7 +35,7 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level) if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT) { - static unsigned int servpack = 0; + unsigned int servpack = 0; TCHAR *pservpack; if ((pservpack = oslev.szCSDVersion)) { while (*pservpack && !apr_isdigit(*pservpack)) { |