Skip to content

Commit

Permalink
storage: clear Entry before reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
tbg committed Sep 10, 2017
1 parent 1fd366d commit 9dcedd6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/storage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3429,6 +3429,7 @@ func sendSnapshot(
{
var ent raftpb.Entry
for i := range logEntries {
ent.Reset()
if err := ent.Unmarshal(logEntries[i]); err != nil {
return err
}
Expand Down

0 comments on commit 9dcedd6

Please sign in to comment.