]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix segfault in util_ald_create_cache() when shared memory caching has been disabled
authorBradley Nicholes <bnicholes@apache.org>
Mon, 1 Mar 2004 18:04:45 +0000 (18:04 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Mon, 1 Mar 2004 18:04:45 +0000 (18:04 +0000)
Reviewed: bnicholes, minfrin, trawick

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

modules/experimental/util_ldap_cache_mgr.c

index 3706514e1503179310a733c6138f0493121e904f..d91add149e81b867770ae313596e88c7046d5f31 100644 (file)
@@ -262,6 +262,8 @@ util_ald_cache_t *util_ald_create_cache(util_ldap_state_t *st,
         return NULL;
 
 #if APR_HAS_SHARED_MEMORY
+    if (!st->cache_rmm)
+        return NULL;
     cache = (util_ald_cache_t *)apr_rmm_addr_get(st->cache_rmm, apr_rmm_calloc(st->cache_rmm, sizeof(util_ald_cache_t)));
 #else
     cache = (util_ald_cache_t *)calloc(sizeof(util_ald_cache_t), 1);