From 22728ce87a81f04fee381b41c5220fba58ab8485 Mon Sep 17 00:00:00 2001 From: asomers Date: Mon, 1 Oct 2018 16:10:27 +0000 Subject: [PATCH] MFC r337779: tftp: Close a resource leak when putting files Reported by: Coverity CID: 1394842 git-svn-id: svn://svn.freebsd.org/base/stable/10@339061 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.bin/tftp/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index b1b24643d..7c054ee63 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -475,6 +475,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 */ -- 2.45.0