mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Prevent NPE when service lacks identity (#19987)
Fixes a null pointer exception if `Alloc.SignIdentities` was called for any service and any service lacked an identity. Fixes #19986
This commit is contained in:
3
.changelog/19986.txt
Normal file
3
.changelog/19986.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
server: Prevent NPE when service lacks identity
|
||||
```
|
||||
@@ -312,7 +312,10 @@ type WIHandle struct {
|
||||
WorkloadType WorkloadType
|
||||
}
|
||||
|
||||
func (w WIHandle) Equal(o WIHandle) bool {
|
||||
func (w *WIHandle) Equal(o WIHandle) bool {
|
||||
if w == nil {
|
||||
return false
|
||||
}
|
||||
return w.IdentityName == o.IdentityName &&
|
||||
w.WorkloadIdentifier == o.WorkloadIdentifier &&
|
||||
w.WorkloadType == o.WorkloadType
|
||||
|
||||
Reference in New Issue
Block a user