svn commit: r243234 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Sun Nov 18 15:48:35 UTC 2012
Author: mjg
Date: Sun Nov 18 15:48:34 2012
New Revision: 243234
URL: http://svnweb.freebsd.org/changeset/base/243234
Log:
Fix possible fp reference leak in posix_openpt
Reviewed by: ed
Approved by: trasz (mentor)
MFC after: 3 days
Modified:
head/sys/kern/tty_pts.c
Modified: head/sys/kern/tty_pts.c
==============================================================================
--- head/sys/kern/tty_pts.c Sun Nov 18 15:48:02 2012 (r243233)
+++ head/sys/kern/tty_pts.c Sun Nov 18 15:48:34 2012 (r243234)
@@ -836,6 +836,7 @@ sys_posix_openpt(struct thread *td, stru
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);
}
More information about the svn-src-all
mailing list