mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
do not close -1
This commit is contained in:
parent
8369671104
commit
6135dd6916
1 changed files with 2 additions and 1 deletions
|
@ -94,7 +94,8 @@ _fsdecref(CFsys *fs)
|
|||
--fs->ref;
|
||||
//fprint(2, "fsdecref %p to %d\n", fs, fs->ref);
|
||||
if(fs->ref == 0){
|
||||
close(fs->fd);
|
||||
if(fs->fd >= 0)
|
||||
close(fs->fd);
|
||||
/* trim the list down to just the first in each chunk */
|
||||
for(l=&fs->freefid; *l; ){
|
||||
if((*l)->fid%CFidchunk == 0)
|
||||
|
|
Loading…
Reference in a new issue