Skip to content

Commit

Permalink
[process][freebsd]: add nil check on kInfoProc
Browse files Browse the repository at this point in the history
  • Loading branch information
shirou committed May 23, 2024
1 parent 8912445 commit e6694f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions process/process_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,5 +338,9 @@ func (p *Process) getKProc() (*KinfoProc, error) {
if err != nil {
return nil, err
}
if k == nil {

Check failure on line 341 in process/process_freebsd.go

View workflow job for this annotation

GitHub Actions / build_test_v3 (1.21.10)

invalid operation: k == nil (mismatched types KinfoProc and untyped nil)

Check failure on line 341 in process/process_freebsd.go

View workflow job for this annotation

GitHub Actions / build_test_v3 (1.22.3)

invalid operation: k == nil (mismatched types KinfoProc and untyped nil)

Check failure on line 341 in process/process_freebsd.go

View workflow job for this annotation

GitHub Actions / build_test_v3 (1.22.3)

invalid operation: k == nil (mismatched types KinfoProc and untyped nil)

Check failure on line 341 in process/process_freebsd.go

View workflow job for this annotation

GitHub Actions / build_test_v3 (1.21.10)

invalid operation: k == nil (mismatched types KinfoProc and untyped nil)
return nil, fmt.Errorf("kInfoProc is nil")

Check failure on line 342 in process/process_freebsd.go

View workflow job for this annotation

GitHub Actions / build_test_v3 (1.21.10)

undefined: fmt

Check failure on line 342 in process/process_freebsd.go

View workflow job for this annotation

GitHub Actions / build_test_v3 (1.22.3)

undefined: fmt

Check failure on line 342 in process/process_freebsd.go

View workflow job for this annotation

GitHub Actions / build_test_v3 (1.22.3)

undefined: fmt

Check failure on line 342 in process/process_freebsd.go

View workflow job for this annotation

GitHub Actions / build_test_v3 (1.21.10)

undefined: fmt
}

return &k, nil
}

0 comments on commit e6694f3

Please sign in to comment.