krb5_context krb_ctx;
krb5_error_code kerr;
krb5_principal principal;
- char *instanceName;
- char *serviceType;
- char *serviceName;
+ char *instanceName = NULL;
+ char *serviceType = NULL;
+ char *serviceName = NULL;
const char *spn_value_str = NULL;
size_t account_name_len;
const char *forest_name = samdb_forest_name(ldb, mem_ctx);
if (krb5_princ_size(krb_ctx, principal) == 3) {
serviceName = smb_krb5_principal_get_comp_string(mem_ctx, krb_ctx,
principal, 2);
- } else {
- serviceName = NULL;
}
if (serviceName) {
goto success;
}
if (is_dc) {
- const char *guid_str;
+ const char *guid_str = NULL;
guid_str = talloc_asprintf(mem_ctx,"%s._msdcs.%s",
ntds_guid,
forest_name);