jorton 2004/06/14 05:04:43
Modified: locks/unix proc_mutex.c
Log:
* 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.
Revision Changes Path
1.47 +2 -5 apr/locks/unix/proc_mutex.c
Index: proc_mutex.c
===================================================================
RCS file: /home/cvs/apr/locks/unix/proc_mutex.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -d -w -u -r1.46 -r1.47
--- proc_mutex.c 14 Jun 2004 11:35:53 -0000 1.46
+++ proc_mutex.c 14 Jun 2004 12:04:42 -0000 1.47
@@ -454,10 +454,8 @@
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 @@
}
if (rv != APR_SUCCESS) {
- proc_mutex_fcntl_cleanup(new_mutex);
return rv;
}