Skip to content

Commit

Permalink
fix: close procRoot dir
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed May 24, 2024
1 parent eb01156 commit d3e90cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/component/pyroscope/java/asprof/asprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (p *Profiler) CopyLib(dist *Distribution, pid int) error {
if err != nil {
return fmt.Errorf("failed to open proc root %s: %w", procRoot, err)
}
defer procRootFile.Close()
dstLibPath := strings.TrimPrefix(dist.LibPath(), "/")
dstLauncherPath := strings.TrimPrefix(dist.LauncherPath(), "/")
if err = writeFile(procRootFile, dstLibPath, libData, false); err != nil {
Expand Down

0 comments on commit d3e90cf

Please sign in to comment.