diff options
author | Jean-Frederic Clere <jfclere@apache.org> | 2018-06-27 15:21:19 +0000 |
---|---|---|
committer | Jean-Frederic Clere <jfclere@apache.org> | 2018-06-27 15:21:19 +0000 |
commit | f77f9a1d44c834c3ef8379daa04cbc45fd395e87 (patch) | |
tree | a7419288d70a2ac59c6716f94797f717be27672d | |
parent | d5aedaeb28079d0e1bbf64e4cf145aeadce83b3d (diff) | |
download | apr-f77f9a1d44c834c3ef8379daa04cbc45fd395e87.tar.gz |
remove the wrong proposal in STATUS and commit a fix for my crash problems.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1834513 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | STATUS | 4 | ||||
-rw-r--r-- | file_io/win32/buffer.c | 12 |
2 files changed, 9 insertions, 7 deletions
@@ -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; } |