|
lease.Spec.HolderIdentity = pointer.String(l.clientID) |
|
if lease.Spec.LeaseTransitions != nil { |
|
lease.Spec.LeaseTransitions = pointer.Int32((*lease.Spec.LeaseTransitions) + 1) |
|
} else { |
|
lease.Spec.LeaseTransitions = pointer.Int32((*lease.Spec.LeaseTransitions) + 1) |
|
} |
Here, the code checks if lease.Spec.LeaseTransitions
is nil
but the if-else branches are identical.
pointer.Int32((*lease.Spec.LeaseTransitions) + 1)
will segfault with a nil
lease.Spec.LeaseTransitions