]> granicus.if.org Git - apache/commitdiff
Fix segfault in util_ald_create_cache() when shared memory caching has been disabled
authorBradley Nicholes <bnicholes@apache.org>
Sat, 21 Feb 2004 00:50:20 +0000 (00:50 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Sat, 21 Feb 2004 00:50:20 +0000 (00:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102717 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/util_ldap_cache_mgr.c

index 8eedcf8a6f6f1b414cb526ea769f542f95ff319f..5c32b01d82effc7eda37558477d868c9209e1ae2 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);