svn commit: r365464 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Tue Sep 8 16:07:47 UTC 2020


Author: mjg
Date: Tue Sep  8 16:07:47 2020
New Revision: 365464
URL: https://svnweb.freebsd.org/changeset/base/365464

Log:
  fd: fix fhold on an uninitialized var in fdcopy_remapped
  
  Reported by:	gcc9

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Tue Sep  8 16:06:46 2020	(r365463)
+++ head/sys/kern/kern_descrip.c	Tue Sep  8 16:07:47 2020	(r365464)
@@ -2213,7 +2213,7 @@ fdcopy_remapped(struct filedesc *fdp, const int *fds, 
 			error = EINVAL;
 			goto bad;
 		}
-		if (!fhold(nfde->fde_file)) {
+		if (!fhold(ofde->fde_file)) {
 			error = EBADF;
 			goto bad;
 		}


More information about the svn-src-head mailing list