diff options
author | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2012-05-06 18:06:43 +0000 |
---|---|---|
committer | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2012-05-06 18:06:43 +0000 |
commit | 0ec60a8a5870fb7760c7ac2982954b590f950590 (patch) | |
tree | a0124309fbf67bba28647c7e9233362846174d48 /file_io | |
parent | 696047093a985293e6c92162e993b7804551e74a (diff) | |
download | libapr-0ec60a8a5870fb7760c7ac2982954b590f950590.tar.gz |
Merge r1044447 and add CHANGES entry:
apr_file_trunc(): Don't leave the file locked if flushing fails
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1334726 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/unix/seek.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/file_io/unix/seek.c b/file_io/unix/seek.c index e70805d7f..3f5aa00e9 100644 --- a/file_io/unix/seek.c +++ b/file_io/unix/seek.c @@ -117,10 +117,10 @@ apr_status_t apr_file_trunc(apr_file_t *fp, apr_off_t offset) /* Reset buffer positions for write mode */ fp->bufpos = fp->direction = fp->dataRead = 0; } + file_unlock(fp); if (rc) { return rc; } - file_unlock(fp); } if (ftruncate(fp->filedes, offset) == -1) { return errno; |