Skip to content

Commit 96f9855

Browse files
committed
apr_file_write, windows: Unlock the file in seek error path.
Sumitted by: @296995966 on github. Github: closes #42 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1916276 13f79535-47bb-0310-9956-ffa450edef68
1 parent c2084d8 commit 96f9855

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

file_io/win32/readwrite.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
470470
}
471471
rc = apr_file_seek(thefile, APR_END, &offset);
472472
if (rc != APR_SUCCESS) {
473+
apr_file_unlock(thefile);
473474
if (thefile->flags & APR_FOPEN_XTHREAD) {
474475
apr_thread_mutex_unlock(thefile->mutex);
475476
}

0 commit comments

Comments
 (0)