Skip to content

Commit

Permalink
Fix panic in Analyzer Manager execution (#952)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Sep 13, 2023
1 parent 07ca5e0 commit cdb4f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xray/utils/analyzermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (am *AnalyzerManager) Exec(configFile, scanCommand, workingDir string, serv
}
cmd := exec.Command(am.AnalyzerManagerFullPath, scanCommand, configFile, am.MultiScanId)
defer func() {
if !cmd.ProcessState.Exited() {
if cmd.ProcessState != nil && !cmd.ProcessState.Exited() {
if killProcessError := cmd.Process.Kill(); errorutils.CheckError(killProcessError) != nil {
err = errors.Join(err, killProcessError)
}
Expand Down

0 comments on commit cdb4f7c

Please sign in to comment.