Author: asomers
Date: Tue Aug 14 17:20:31 2018
New Revision: 337779
URL: https://svnweb.freebsd.org/changeset/base/337779

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

Modified:
  head/usr.bin/tftp/main.c

Modified: head/usr.bin/tftp/main.c
==============================================================================
--- head/usr.bin/tftp/main.c    Tue Aug 14 17:19:49 2018        (r337778)
+++ head/usr.bin/tftp/main.c    Tue Aug 14 17:20:31 2018        (r337779)
@@ -499,6 +499,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 */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to