krb5: Quiet static analyzer warning in krbhst

This commit is contained in:
Nicolas Williams
2023-01-02 20:30:16 -06:00
parent a1c0639ddd
commit e5a8a6f972

View File

@@ -343,6 +343,12 @@ append_host_hostinfo(struct krb5_krbhst_data *kd, struct krb5_krbhst_info *host)
_krb5_free_krbhst_info(host);
return;
}
/*
* We should always initialize kd->end in common_init(), but static
* analyzers may not see that we do, and the compiler might conclude
* there's UB here.
*/
if (kd->end)
*kd->end = host;
kd->end = &host->next;
}