From 73c8ae2c86449a741eedf3361679bd8118a5d122 Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Fri, 18 Nov 2016 01:20:19 +0100 Subject: [PATCH] Add missing Close() before return --- ftp.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ftp.go b/ftp.go index db7ac92..60a8dd6 100644 --- a/ftp.go +++ b/ftp.go @@ -257,6 +257,7 @@ func (c *ServerConn) cmdDataConnFrom(offset uint64, format string, args ...inter if offset != 0 { _, _, err := c.cmd(StatusRequestFilePending, "REST %d", offset) if err != nil { + conn.Close() return nil, err } }