From 987b4e323423bd7379582d91446e04eeed5afad0 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 7 Apr 2019 14:43:47 +0300 Subject: [PATCH] (ftpfs_get_proxy_host_and_port): ret rid of host name duplcation. Signed-off-by: Andrew Borodin --- src/vfs/ftpfs/ftpfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vfs/ftpfs/ftpfs.c b/src/vfs/ftpfs/ftpfs.c index 674d6dc31..15fa0f001 100644 --- a/src/vfs/ftpfs/ftpfs.c +++ b/src/vfs/ftpfs/ftpfs.c @@ -832,7 +832,8 @@ ftpfs_get_proxy_host_and_port (const char *proxy, char **host, int *port) vfs_path_element_t *path_element; path_element = vfs_url_split (proxy, FTP_COMMAND_PORT, URL_USE_ANONYMOUS); - *host = g_strdup (path_element->host); + *host = path_element->host; + path_element->host = NULL; *port = path_element->port; vfs_path_element_free (path_element); }