Skip to content

Commit

Permalink
Fix nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Aug 21, 2023
1 parent c479d5b commit bf8082c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/grpcserver/smesher_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ func statusToPbStatus(status *activation.PostSetupStatus) *pb.PostSetupStatus {
if status.LastOpts != nil {
var providerID *uint32
if status.LastOpts.ProviderID.Value() != nil {
providerID = new(uint32)

Check warning on line 261 in api/grpcserver/smesher_service.go

View check run for this annotation

Codecov / codecov/patch

api/grpcserver/smesher_service.go#L261

Added line #L261 was not covered by tests
*providerID = uint32(*status.LastOpts.ProviderID.Value())
}

Expand Down

0 comments on commit bf8082c

Please sign in to comment.