diff options
author | Stefan Fritsch <sf@apache.org> | 2011-04-26 21:17:16 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-04-26 21:17:16 +0200 |
commit | 6eaa4a5590ed8fabfc40f314bcff4f6374865258 (patch) | |
tree | 4e7f0037f5c86f98a74dc36de284f163e8fe0c02 /modules/ldap/util_ldap_cache_mgr.c | |
parent | WinNT MPM has hard-coded daemon limit of 1, not 0 (diff) | |
download | apache2-6eaa4a5590ed8fabfc40f314bcff4f6374865258.tar.xz apache2-6eaa4a5590ed8fabfc40f314bcff4f6374865258.zip |
Fix double free in out-of-mem situation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096855 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/ldap/util_ldap_cache_mgr.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/modules/ldap/util_ldap_cache_mgr.c b/modules/ldap/util_ldap_cache_mgr.c index 2f1d844bba..1998c13e0b 100644 --- a/modules/ldap/util_ldap_cache_mgr.c +++ b/modules/ldap/util_ldap_cache_mgr.c @@ -365,15 +365,8 @@ util_ald_cache_t *util_ald_create_cache(util_ldap_state_t *st, cache->nodes = (util_cache_node_t **)util_ald_alloc(cache, cache->size * sizeof(util_cache_node_t *)); if (!cache->nodes) { + /* This frees cache in the right way even if !APR_HAS_SHARED_MEMORY or !st->cache_rmm */ util_ald_free(cache, cache); -#if APR_HAS_SHARED_MEMORY - if (!st->cache_rmm) - free(cache); - else - apr_rmm_free(st->cache_rmm, block); -#else - free(cache); -#endif return NULL; } |