Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8221544

Browse files
authored
chore: check if process is nil (#11090)
* chore: check if process is nilWe check if process is nil in the ports_supported file.Just matching that defensive check, not sure if it can be nil.
1 parentdbbf8ac commit8221544

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎agent/agentssh/portinspection_supported.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ func getListeningPortProcessCmdline(port uint32) (string, error) {
2020
iflen(tabs)==0 {
2121
return"",nil
2222
}
23+
24+
// Defensive check.
25+
iftabs[0].Process==nil {
26+
return"",nil
27+
}
28+
2329
// The process name provided by go-netstat does not include the full command
2430
// line so grab that instead.
2531
pid:=tabs[0].Process.Pid

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp