summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2017-06-02 17:44:41 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2017-06-02 17:44:41 +0000
commit48271e0b64ef62798949258733be0a7c828d38f5 (patch)
tree120211c1da0a6609dc1ea0bd71847a3f1de042f4
parent12609103b280c1df93c8fba468cd9072d79b1dab (diff)
downloadapr-48271e0b64ef62798949258733be0a7c828d38f5.tar.gz
Revert to 1.5.x apr_os_proc_mutex_get() behavior on Netware with an additional
guard against dereferencing a NULL pointer. The assignment appears to be a noop but avoiding changes in this logic from 1.5.x -> 1.6.x is the primary goal. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1797413 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--locks/netware/proc_mutex.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/locks/netware/proc_mutex.c b/locks/netware/proc_mutex.c
index c36488828..b07116459 100644
--- a/locks/netware/proc_mutex.c
+++ b/locks/netware/proc_mutex.c
@@ -116,9 +116,9 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
- if (!pmutex->mutex) {
- return APR_ENOLOCK;
- }
+ if (pmutex && pmutex->mutex)
+ ospmutex = pmutex->mutex->mutex;
+ return APR_ENOLOCK;
#if 0
/* We need to change apr_os_proc_mutex_t to a pointer type
* to be able to implement this function.
@@ -127,12 +127,8 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
if (mech) {
*mech = APR_LOCK_DEFAULT;
}
-#else
- if (mech) {
- *mech = APR_LOCK_DEFAULT;
- }
-#endif
return APR_SUCCESS;
+#endif
}
APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,