Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2018 15:57:50 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r339054 - stable/11/usr.bin/tftp
Message-ID:  <201810011557.w91FvoW1008418@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810011557.w91FvoW1008418>