Skip to content

Commit

Permalink
fix file leak in gen/slide.go
Browse files Browse the repository at this point in the history
This didn't impacted anything since the process would exit right away, but we would like the file if w.WriteTo failed.
  • Loading branch information
Jorropo committed Jun 20, 2024
1 parent b7b7af4 commit 4b72a90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gen/slide.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ sz_0l:
if err != nil {
return err
}
defer f.Close()
_, err = w.WriteTo(f)
if err != nil {
os.Remove(path)
Expand Down

0 comments on commit 4b72a90

Please sign in to comment.