kdc: Fix deref-before-NULL-check in _kdc_db_fetch()

This commit is contained in:
Nicolas Williams
2023-01-04 02:07:25 -06:00
parent 6b2e65592d
commit cb09267ed9

View File

@@ -139,7 +139,8 @@ _kdc_db_fetch(krb5_context context,
krb5_const_principal princ;
*h = NULL;
*db = NULL;
if (db)
*db = NULL;
if (!name_type_ok(context, config, principal))
return HDB_ERR_NOENTRY;