Add nil pointer check for InSDBBuffer
- Gotgt was crashing for few opcodes (sg_inq (sg3-utils)) because InSDBBuffer was not initialized for such opcodes (Need help) Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
This commit is contained in:
@@ -96,7 +96,7 @@ func (s *SCSITargetService) AddCommandQueue(tid int, scmd *api.SCSICommand) erro
|
||||
result := scmd.Device.PerformCommand(tid, scmd)
|
||||
if result != api.SAMStatGood {
|
||||
scmd.Result = result.Stat
|
||||
log.Warnf("%v", result.Err)
|
||||
log.Warnf("opcode: %xh err: %v", scmd.OpCode, result.Err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user