From: Bradley Nicholes Date: Sat, 21 Feb 2004 00:50:20 +0000 (+0000) Subject: Fix segfault in util_ald_create_cache() when shared memory caching has been disabled X-Git-Tag: pre_ajp_proxy~647 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8db89f5cb43eafefcf40caa22afa5b438370b6cb;p=apache Fix segfault in util_ald_create_cache() when shared memory caching has been disabled git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102717 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/util_ldap_cache_mgr.c b/modules/experimental/util_ldap_cache_mgr.c index 8eedcf8a6f..5c32b01d82 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);