Fix possible fp reference leak in posix_openpt
Reviewed by: ed Approved by: trasz (mentor) MFC after: 3 days
This commit is contained in:
parent
1617f53d51
commit
fb4bab611c
@ -836,6 +836,7 @@ sys_posix_openpt(struct thread *td, struct posix_openpt_args *uap)
|
||||
error = pts_alloc(FFLAGS(uap->flags & O_ACCMODE), td, fp);
|
||||
if (error != 0) {
|
||||
fdclose(td->td_proc->p_fd, fp, fd, td);
|
||||
fdrop(fp, td);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user