lib/krb5: srv_find_realm do not leak 'r' if unreachable

Change-Id: I6e16676c9cb820d6a25820523608cb9854fa2ce4
This commit is contained in:
Jeffrey Altman
2022-01-16 17:04:04 -05:00
parent 65276af7f6
commit 8eaecdaa59

View File

@@ -113,6 +113,7 @@ srv_find_realm(krb5_context context, krb5_krbhst_info ***res, int *count,
if (num_srv == 0) { if (num_srv == 0) {
_krb5_debug(context, 0, _krb5_debug(context, 0,
"DNS SRV RR lookup domain nodata: %s", domain); "DNS SRV RR lookup domain nodata: %s", domain);
rk_dns_free_data(r);
return KRB5_KDC_UNREACH; return KRB5_KDC_UNREACH;
} }