summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--STATUS4
-rw-r--r--file_io/win32/buffer.c12
2 files changed, 9 insertions, 7 deletions
diff --git a/STATUS b/STATUS
index 037a9b2f9..ddae00c49 100644
--- a/STATUS
+++ b/STATUS
@@ -98,10 +98,6 @@ CURRENT VOTES:
1.5.x patch: http://people.apache.org/~jim/patches/apr-1.5-permset.patch
+1:
- * make sure we don't unlock mutex when we haven't locked it.
- 1.6.x patch: http://people.apache.org/~jfclere/patch.180618.txt
- +1 jfclere
-
CURRENT test/testall -v EXCEPTIONS:
Please add any platform anomilies to the following exception list.
diff --git a/file_io/win32/buffer.c b/file_io/win32/buffer.c
index 34e4e6393..479726535 100644
--- a/file_io/win32/buffer.c
+++ b/file_io/win32/buffer.c
@@ -23,13 +23,17 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
{
apr_status_t rv;
- apr_thread_mutex_lock(file->mutex);
+ if (file->mutex) {
+ apr_thread_mutex_lock(file->mutex);
+ }
if(file->buffered) {
/* Flush the existing buffer */
rv = apr_file_flush(file);
if (rv != APR_SUCCESS) {
- apr_thread_mutex_unlock(file->mutex);
+ if (file->mutex) {
+ apr_thread_mutex_unlock(file->mutex);
+ }
return rv;
}
}
@@ -48,7 +52,9 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
file->buffered = 0;
}
- apr_thread_mutex_unlock(file->mutex);
+ if (file->mutex) {
+ apr_thread_mutex_unlock(file->mutex);
+ }
return APR_SUCCESS;
}