From 9f013f98e9721e6b745b5ef64c7e33fe70af4554 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet Date: Mon, 26 Mar 2018 16:43:18 +0200 Subject: [PATCH] whisper: fix memalloc issue that slipped in --- whisper/whisperv6/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisper/whisperv6/api.go b/whisper/whisperv6/api.go index 74b8873d10..2e2fdc6955 100644 --- a/whisper/whisperv6/api.go +++ b/whisper/whisperv6/api.go @@ -560,7 +560,7 @@ func (api *PublicWhisperAPI) NewMessageFilter(req Criteria) (string, error) { if len(req.Topics) > 0 { topics = make([][]byte, len(req.Topics)) for i, topic := range req.Topics { - topics = append(topics, make([]byte, 0, len(topic))) + topics[i] = make([]byte, 0, len(topic)) copy(topics[i], topic[:]) } }