diff options
Diffstat (limited to 'src/libbio')
-rw-r--r-- | src/libbio/binit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libbio/binit.c b/src/libbio/binit.c index 8ec375ce..95a70a28 100644 --- a/src/libbio/binit.c +++ b/src/libbio/binit.c @@ -141,13 +141,15 @@ Bopen(char *name, int mode) int Bterm(Biobuf *bp) { + int ret; deinstall(bp); - Bflush(bp); + ret = Bflush(bp); if(bp->flag == Bmagic) { bp->flag = 0; - close(bp->fid); + if(close(bp->fid) < 0) + ret = -1; free(bp); } - return 0; + return ret; } |