]> granicus.if.org Git - apache/commitdiff
* modules/ldap/util_ldap_cache.c (util_ldap_cache_init): Only remove
authorJoe Orton <jorton@apache.org>
Tue, 2 Aug 2005 14:15:35 +0000 (14:15 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 2 Aug 2005 14:15:35 +0000 (14:15 +0000)
the shm segment by name if a name is configured.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@227012 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap_cache.c

index 313f3805709d3e1b1c14a44d568875e816487cd0..904d1721d13869a30be5d93f984565fc0d5d4a50 100644 (file)
@@ -396,8 +396,10 @@ apr_status_t util_ldap_cache_init(apr_pool_t *pool, util_ldap_state_t *st)
     apr_status_t result;
     apr_size_t size;
 
-    /* Remove any existing shm segment with this name. */
-    apr_shm_remove(st->cache_file, st->pool);
+    if (st->cache_file) {
+        /* Remove any existing shm segment with this name. */
+        apr_shm_remove(st->cache_file, st->pool);
+    }
 
     size = APR_ALIGN_DEFAULT(st->cache_bytes);