]> granicus.if.org Git - apache/commitdiff
Check for a NULL file name before trying to delete the file
authorBradley Nicholes <bnicholes@apache.org>
Sat, 26 Jun 2004 16:00:26 +0000 (16:00 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Sat, 26 Jun 2004 16:00:26 +0000 (16:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104044 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/util_ldap.c

index 72797c7fd89c27ee2f3b9816cc1e7dd31477f7b2..3b5e1c5869a3338455021c248be89a46a5066f04 100644 (file)
@@ -1188,9 +1188,9 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
 #if APR_HAS_SHARED_MEMORY
         /* If the cache file already exists then delete it.  Otherwise we are
          * going to run into problems creating the shared memory. */
-        apr_file_remove(st->cache_file, ptemp);
         if (st->cache_file) {
             char *lck_file = apr_pstrcat (st->pool, st->cache_file, ".lck", NULL);
+            apr_file_remove(st->cache_file, ptemp);
             apr_file_remove(lck_file, ptemp);
         }
 #endif