Now that dupfdopen() doesn't depend on finstall() being called earlier,
indx will never be -1 on error, as none of dupfdopen(), finstall() and kern_capwrap() modifies it on error, but what is more important none of those functions install and leave file at indx descriptor on error. Leave an assert to prove my words. MFC after: 1 month
This commit is contained in:
parent
f695b590b4
commit
0123f7ed5a
@ -1237,8 +1237,7 @@ success:
|
||||
bad:
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
bad_unlocked:
|
||||
if (indx != -1)
|
||||
fdclose(fdp, fp, indx, td);
|
||||
KASSERT(indx == -1, ("indx=%d, should be -1", indx));
|
||||
fdrop(fp, td);
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user