From 56f6c11f641039035e633ff2cf1b73503db02708 Mon Sep 17 00:00:00 2001 From: Bradley Nicholes Date: Mon, 1 Mar 2004 18:04:45 +0000 Subject: [PATCH] Fix segfault in util_ald_create_cache() when shared memory caching has been disabled 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/experimental/util_ldap_cache_mgr.c b/modules/experimental/util_ldap_cache_mgr.c index 3706514e150..d91add149e8 100644 --- a/modules/experimental/util_ldap_cache_mgr.c +++ b/modules/experimental/util_ldap_cache_mgr.c @@ -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); -- 2.47.2