From 780cc0889fd2f326e4a2a9b513d8d30ff37e0cd2 Mon Sep 17 00:00:00 2001 From: Tomasz Ziolkowski Date: Fri, 15 Oct 2021 16:56:27 +0200 Subject: [PATCH] reduce redundant memory allocatio - resolves btcsuite/btcd#1699 Signed-off-by: Tomasz Ziolkowski --- connmgr/tor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connmgr/tor.go b/connmgr/tor.go index 2b22ae51..a2e512db 100644 --- a/connmgr/tor.go +++ b/connmgr/tor.go @@ -76,7 +76,7 @@ func TorLookupIP(host, proxy string) ([]net.IP, error) { return nil, ErrTorUnrecognizedAuthMethod } - buf = make([]byte, 7+len(host)) + buf = make([]byte, 6+len(host)) buf[0] = 5 // protocol version buf[1] = '\xF0' // Tor Resolve buf[2] = 0 // reserved