whisper: fix memalloc issue that slipped in

This commit is contained in:
Guillaume Ballet 2018-03-26 16:43:18 +02:00
parent fd8a2786d4
commit 9f013f98e9

View file

@ -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[:])
}
}