summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-06-14 12:04:42 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-06-14 12:04:42 +0000
commitee5fbac8e7820af5e8b040514d824e4f1286f861 (patch)
tree34831ef38b92787fc8463d09408656acfbc91819
parentb8f5fde509571b1b43403e42f31b9d4f6249f2fb (diff)
downloadlibapr-ee5fbac8e7820af5e8b040514d824e4f1286f861.tar.gz
* locks/unix/proc_mutex.c (proc_mutex_fcntl_cleanup): Always close the
file. (proc_mutex_fcntl_create): Don't call _cleanup on file open failure. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65193 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--locks/unix/proc_mutex.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/locks/unix/proc_mutex.c b/locks/unix/proc_mutex.c
index d80ccee59..4156d537f 100644
--- a/locks/unix/proc_mutex.c
+++ b/locks/unix/proc_mutex.c
@@ -454,10 +454,8 @@ static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)
if (status != APR_SUCCESS)
return status;
}
- if (mutex->interproc) { /* if it was opened successfully */
- apr_file_close(mutex->interproc);
- }
- return APR_SUCCESS;
+
+ return apr_file_close(mutex->interproc);
}
static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
@@ -480,7 +478,6 @@ static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
}
if (rv != APR_SUCCESS) {
- proc_mutex_fcntl_cleanup(new_mutex);
return rv;
}