summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libfetch/ftp.c')
-rw-r--r--lib/libfetch/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index 7b1bece..e703a01 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -874,7 +874,7 @@ _ftp_cached_connect(struct url *url, struct url *purl, const char *flags)
return (NULL);
if (cached_connection)
_ftp_disconnect(cached_connection);
- cached_connection = conn;
+ cached_connection = _fetch_ref(conn);
memcpy(&cached_host, url, sizeof *url);
return (conn);
}
OpenPOWER on IntegriCloud