Fix memory leak

This commit is contained in:
Viktor Dukhovni
2015-11-13 18:26:17 +00:00
committed by Viktor Dukhovni
parent c3eb3341c2
commit 54d37fdba6

View File

@@ -1710,8 +1710,10 @@ server_lookup:
krb5_make_principal(context, &sp, r, KRB5_TGS_NAME,
realms[0], NULL);
ret = krb5_unparse_name(context, sp, &spn);
if (ret)
if (ret) {
krb5_free_host_realm(context, realms);
goto out;
}
if (ref_realm)
free(ref_realm);