apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1797413 - /apr/apr/branches/1.6.x/locks/netware/proc_mutex.c
Date Fri, 02 Jun 2017 17:44:41 GMT
Author: wrowe
Date: Fri Jun  2 17:44:41 2017
New Revision: 1797413

URL: http://svn.apache.org/viewvc?rev=1797413&view=rev
Log:
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.


Modified:
    apr/apr/branches/1.6.x/locks/netware/proc_mutex.c

Modified: apr/apr/branches/1.6.x/locks/netware/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/netware/proc_mutex.c?rev=1797413&r1=1797412&r2=1797413&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/locks/netware/proc_mutex.c (original)
+++ apr/apr/branches/1.6.x/locks/netware/proc_mutex.c Fri Jun  2 17:44:41 2017
@@ -116,9 +116,9 @@ APR_DECLARE(apr_status_t) apr_os_proc_mu
                                                    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_mu
     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,



Mime
View raw message