Skip to content

Commit

Permalink
fix(export-backup): Fix double free in export backup (#7780) (#7783)
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.

(cherry picked from commit 00a67d5)
  • Loading branch information
ahsanbarkati authored May 5, 2021
1 parent 4c5a7ae commit f12cd7d
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 @@ -217,11 +217,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 f12cd7d

Please sign in to comment.