Index: modules/ldap/util_ldap_cache.c =================================================================== --- modules/ldap/util_ldap_cache.c (Revision 928898) +++ modules/ldap/util_ldap_cache.c (Arbeitskopie) @@ -420,6 +420,7 @@ apr_status_t result; apr_size_t size; + if (st->cache_bytes > 0) { if (st->cache_file) { /* Remove any existing shm segment with this name. */ apr_shm_remove(st->cache_file, st->pool); @@ -442,6 +443,7 @@ if (result != APR_SUCCESS) { return result; } + } #endif Index: modules/ldap/util_ldap_cache_mgr.c =================================================================== --- modules/ldap/util_ldap_cache_mgr.c (Revision 928898) +++ modules/ldap/util_ldap_cache_mgr.c (Arbeitskopie) @@ -335,7 +335,7 @@ #if APR_HAS_SHARED_MEMORY if (!st->cache_rmm) { - return NULL; + cache = (util_ald_cache_t *)calloc(sizeof(util_ald_cache_t), 1); } else { apr_rmm_off_t block = apr_rmm_calloc(st->cache_rmm, sizeof(util_ald_cache_t)); Index: modules/ldap/util_ldap.c =================================================================== --- modules/ldap/util_ldap.c (Revision 928898) +++ modules/ldap/util_ldap.c (Arbeitskopie) @@ -2710,7 +2710,7 @@ #if APR_HAS_SHARED_MEMORY /* If the cache file already exists then delete it. Otherwise we are * going to run into problems creating the shared memory. */ - if (st->cache_file) { + if (st->cache_file && st->cache_bytes > 0) { char *lck_file = apr_pstrcat(ptemp, st->cache_file, ".lck", NULL); apr_file_remove(lck_file, ptemp); @@ -2723,7 +2723,7 @@ /* initializing cache if shared memory size is not zero and we already * don't have shm address */ - if (!st->cache_shm && st->cache_bytes > 0) { + if (!st->cache_shm && st->cache_bytes >= 0) { #endif result = util_ldap_cache_init(p, st); if (result != APR_SUCCESS) {