From: Graham Leggett Date: Thu, 23 Sep 2004 17:08:27 +0000 (+0000) Subject: Backport: Fix the global mutex crash when the global mutex is never allocated X-Git-Tag: 2.0.52~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=357c6b9496d6494a85f7fcaaf2460c068acf125f;p=thirdparty%2Fapache%2Fhttpd.git Backport: Fix the global mutex crash when the global mutex is never allocated due to disabled/empty caches. PR: Obtained from: Submitted by: Jess Holle Reviewed by: minfrin, bnicholes, trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@105270 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 0b964650984..b02c228bb69 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.52 + *) Fix the global mutex crash when the global mutex is never allocated + due to disabled/empty caches. [Jess Holle ] + *) Fix a segfault in the LDAP cache when it is configured switched off. [Jess Holle ] diff --git a/STATUS b/STATUS index 58cb4d3e258..2d35bc4609b 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2004/09/23 16:58:17 $] +Last modified at [$Date: 2004/09/23 17:08:25 $] Release: @@ -92,11 +92,6 @@ PATCHES TO BACKPORT FROM 2.1 http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/protocol.c?r1=1.152&r2=1.153 +1: jorton, jerenkrantz, trawick - *) Fix the global mutex crash when the global mutex is never allocated - due to disabled/empty caches. - modules/ldap/util_ldap.c: 1.13 - +1: minfrin, bnicholes, trawick - *) Fix a segfault in the LDAP cache purge. PR 24801 modules/ldap/util_ldap_cache_mgr.c: 1.9, 1.10 +1: minfrin, bnicholes diff --git a/modules/experimental/util_ldap.c b/modules/experimental/util_ldap.c index 753f8d7d90b..0bff66d05ca 100644 --- a/modules/experimental/util_ldap.c +++ b/modules/experimental/util_ldap.c @@ -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)