Skip to content

Commit

Permalink
apr_file_write, windows: Unlock the file in seek error path.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ylavic committed Mar 13, 2024
1 parent c2084d8 commit 96f9855
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions file_io/win32/readwrite.c
Expand Up @@ -470,6 +470,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
}
rc = apr_file_seek(thefile, APR_END, &offset);
if (rc != APR_SUCCESS) {
apr_file_unlock(thefile);
if (thefile->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_unlock(thefile->mutex);
}
Expand Down

0 comments on commit 96f9855

Please sign in to comment.