From 3e7c852970ec050794becdaef04382d6e63c15b2 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Sun, 1 Apr 2018 21:27:16 -0700 Subject: [PATCH] Fix a crash --- src/local.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/local.c b/src/local.c index c2852f7d..30800e61 100644 --- a/src/local.c +++ b/src/local.c @@ -838,13 +838,11 @@ server_recv_cb(EV_P_ ev_io *w, int revents) abuf->len = 0; abuf->data[abuf->len++] = 3; abuf->data[abuf->len++] = ret; - memcpy(abuf->data + abuf->len, hostname, ret); + memcpy(abuf->data + abuf->len, host, ret); abuf->len += ret; dst_port = htons(dst_port); memcpy(abuf->data + abuf->len, &dst_port, 2); abuf->len += 2; - - ss_free(hostname); } }