svn commit: r339054 - stable/11/usr.bin/tftp

Alan Somers asomers at FreeBSD.org
Mon Oct 1 15:57:50 UTC 2018


Author: asomers
Date: Mon Oct  1 15:57:49 2018
New Revision: 339054
URL: https://svnweb.freebsd.org/changeset/base/339054

Log:
  MFC r337779:
  
  tftp: Close a resource leak when putting files
  
  Reported by:	Coverity
  CID:		1394842

Modified:
  stable/11/usr.bin/tftp/main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/tftp/main.c
==============================================================================
--- stable/11/usr.bin/tftp/main.c	Mon Oct  1 15:56:42 2018	(r339053)
+++ stable/11/usr.bin/tftp/main.c	Mon Oct  1 15:57:49 2018	(r339054)
@@ -472,6 +472,7 @@ put(int argc, char *argv[])
 			printf("putting %s to %s:%s [%s]\n",
 			    cp, hostname, targ, mode);
 		xmitfile(peer, port, fd, targ, mode);
+		close(fd);
 		return;
 	}
 				/* this assumes the target is a directory */


More information about the svn-src-stable-11 mailing list