svn commit: r243584 - stable/9/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Tue Nov 27 01:33:23 UTC 2012


Author: mjg
Date: Tue Nov 27 01:33:23 2012
New Revision: 243584
URL: http://svnweb.freebsd.org/changeset/base/243584

Log:
  MFC r243234:
  
  Fix possible fp reference leak in posix_openpt

Modified:
  stable/9/sys/kern/tty_pts.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/tty_pts.c
==============================================================================
--- stable/9/sys/kern/tty_pts.c	Tue Nov 27 01:30:12 2012	(r243583)
+++ stable/9/sys/kern/tty_pts.c	Tue Nov 27 01:33:23 2012	(r243584)
@@ -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-stable-9 mailing list