]> granicus.if.org Git - apache/commitdiff
Fix the global mutex crash when the global mutex is never allocated due
authorGraham Leggett <minfrin@apache.org>
Sun, 19 Sep 2004 23:11:10 +0000 (23:11 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 19 Sep 2004 23:11:10 +0000 (23:11 +0000)
to disabled/empty caches.
PR:
Obtained from:
Submitted by: Jess Holle <jessh ptc.com>
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105208 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ldap/util_ldap.c

diff --git a/CHANGES b/CHANGES
index f13a41bc7efd46b0793c17336b17d3e19da1fb0d..dbed042fe5c6d4ad381aaee899dc202939ab69db 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Fix the global mutex crash when the global mutex is never allocated due
+     to disabled/empty caches. [Jess Holle <jessh ptc.com>]
+
   *) Fix a segfault in the LDAP cache purge. [Jess Holle <jessh ptc.com>]
 
   *) mod_rewrite: Handle per-location rules when r->filename is unset.
index 3258c714118cc29ce5f03dd275a814e7c417cbca..238ad28e69141477efd44bede338631fa35042c7 100644 (file)
@@ -89,9 +89,11 @@ void *util_ldap_create_config(apr_pool_t *p, server_rec *s);
 #endif
 
 #define LDAP_CACHE_LOCK() \
-    apr_global_mutex_lock(st->util_ldap_cache_lock)
+    if (st->util_ldap_cache_lock) \
+      apr_global_mutex_lock(st->util_ldap_cache_lock)
 #define LDAP_CACHE_UNLOCK() \
-    apr_global_mutex_unlock(st->util_ldap_cache_lock)
+    if (st->util_ldap_cache_lock) \
+      apr_global_mutex_unlock(st->util_ldap_cache_lock)
 
 
 static void util_ldap_strdup (char **str, const char *newstr)