From: Bradley Nicholes Date: Mon, 1 Mar 2004 18:04:45 +0000 (+0000) Subject: Fix segfault in util_ald_create_cache() when shared memory caching has been disabled X-Git-Tag: 2.0.49~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56f6c11f641039035e633ff2cf1b73503db02708;p=thirdparty%2Fapache%2Fhttpd.git 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 --- 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);