From 2c11d40478cf330abc3a3b45658cd1dbc0fc9de0 Mon Sep 17 00:00:00 2001 From: mturk Date: Tue, 24 Apr 2018 07:14:11 +0000 Subject: Unlock mutex only if APR_FOPEN_XTHREAD flag is set git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1829962 13f79535-47bb-0310-9956-ffa450edef68 --- file_io/win32/buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'file_io') diff --git a/file_io/win32/buffer.c b/file_io/win32/buffer.c index 1b7d857ca..7f5d9d375 100644 --- a/file_io/win32/buffer.c +++ b/file_io/win32/buffer.c @@ -31,7 +31,9 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file, /* Flush the existing buffer */ rv = apr_file_flush(file); if (rv != APR_SUCCESS) { - apr_thread_mutex_unlock(file->mutex); + if (file->flags & APR_FOPEN_XTHREAD) { + apr_thread_mutex_unlock(file->mutex); + } return rv; } } -- cgit v1.2.1