ntp: improve NTS check in NAU_DestroyInstance()
Check the mode instead of the nts pointer to make it clear the pointer is not expected to be NULL in an NTS instance (unless the NTS support is stubbed).
This commit is contained in:
parent
35b3a42ed9
commit
59ad433b6b
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ NAU_CreateNtsInstance(IPSockAddr *nts_address, const char *name, const IPSockAdd
|
|||
void
|
||||
NAU_DestroyInstance(NAU_Instance instance)
|
||||
{
|
||||
if (instance->nts)
|
||||
if (instance->mode == NTP_AUTH_NTS)
|
||||
NNC_DestroyInstance(instance->nts);
|
||||
Free(instance);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue