summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/db-glue.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index ae93b75bef..77c84303a5 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -1363,7 +1363,6 @@ static krb5_error_code samba_kdc_lookup_server(krb5_context context,
} else {
int lret;
- char *filter = NULL;
char *short_princ;
const char *realm;
/* server as client principal case, but we must not lookup userPrincipalNames */
@@ -1386,16 +1385,18 @@ static krb5_error_code samba_kdc_lookup_server(krb5_context context,
DSDB_SEARCH_SHOW_EXTENDED_DN | DSDB_SEARCH_NO_GLOBAL_CATALOG,
"(&(objectClass=user)(samAccountName=%s))",
ldb_binary_encode_string(mem_ctx, short_princ));
- free(short_princ);
if (lret == LDB_ERR_NO_SUCH_OBJECT) {
- DEBUG(3, ("Failed find a entry for %s\n", filter));
+ DEBUG(3, ("Failed to find an entry for %s\n", short_princ));
+ free(short_princ);
return HDB_ERR_NOENTRY;
}
if (lret != LDB_SUCCESS) {
- DEBUG(3, ("Failed single search for for %s - %s\n",
- filter, ldb_errstring(kdc_db_ctx->samdb)));
+ DEBUG(3, ("Failed single search for %s - %s\n",
+ short_princ, ldb_errstring(kdc_db_ctx->samdb)));
+ free(short_princ);
return HDB_ERR_NOENTRY;
}
+ free(short_princ);
}
return 0;