Skip to content

Commit

Permalink
fix(export-backup): Fix double free in export backup (#7780)
Browse files Browse the repository at this point in the history
Fix issue of double-free in export-backup. kvBuf is released by 
the reducer so the Writer shouldn't free it.
  • Loading branch information
ahsanbarkati authored May 5, 2021
1 parent c86b855 commit 00a67d5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ee/backup/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,7 @@ func (bw *bufWriter) Write(buf *z.Buffer) error {
}
return nil
})
if err != nil {
return err
}
buf.Release()
return nil
return errors.Wrap(err, "bufWriter failed to write")
}

func runExportBackup() error {
Expand Down

0 comments on commit 00a67d5

Please sign in to comment.