aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-02-05 18:00:26 +0000
committerdrh <drh@noemail.net>2010-02-05 18:00:26 +0000
commit309e6555a5663c919bd1eee3ae443d37ed087e65 (patch)
tree97bfb5fbdba37423d1a2865629c2d8d280f9f1fe /src/os_unix.c
parent6885de360dd15b3e72ce8b98066e8dcd4b5aa4f2 (diff)
downloadsqlite-309e6555a5663c919bd1eee3ae443d37ed087e65.tar.gz
sqlite-309e6555a5663c919bd1eee3ae443d37ed087e65.zip
Make sure file descriptors are closed before unlinking in VxWorks.
FossilOrigin-Name: f64b81f13de4875343c752e7183bf61032dc9594
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index b9ea20ffd..9dc207557 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3822,6 +3822,8 @@ static int fillInUnixFile(
pNew->lastErrno = 0;
#if OS_VXWORKS
if( rc!=SQLITE_OK ){
+ if( h>=0 ) close(h);
+ h = -1;
unlink(zFilename);
isDelete = 0;
}