From da6815ec62c7606f013d7a155e48daca104b1d5a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 27 Mar 2019 17:37:34 +0100 Subject: [PATCH] Fix memleak --- src/socks5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socks5.c b/src/socks5.c index a129cd4..f8f27ea 100644 --- a/src/socks5.c +++ b/src/socks5.c @@ -38,7 +38,7 @@ void socks5_create_dns_client(struct evt_core_ctx* ctx, char* proxy_host, char* memset(fdinfo.other, 0, sizeof(struct socks5_ctx)); fdinfo.free_other = socks5_free_ctx; sprintf(url, "socks5:send-hs:%s:%d", addr, port); - fdinfo.url = strdup(url); + fdinfo.url = url; // 3. Fill socks5_ctx structures s5ctx = fdinfo.other;