Skip to content

Commit

Permalink
fix: close procRoot dir
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored and simonswine committed May 21, 2024
1 parent ada0921 commit 0042085
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 0042085

Please sign in to comment.