Skip to content

Commit f450fe9

Browse files
committed
Correctly close tar and zstd writers
1 parent 0b5c2ff commit f450fe9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/parca-debuginfo/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,10 @@ func run(kongCtx *kong.Context, flags flags) error {
376376
if err != nil {
377377
return fmt.Errorf("create zstd writer: %w", err)
378378
}
379+
defer zw.Close()
379380

380381
tw := tar.NewWriter(zw)
382+
defer tw.Close()
381383

382384
d, err := f.DWARF()
383385
if err != nil {

0 commit comments

Comments
 (0)