From 07b36dc96ce4864eeb3bd1df1bbdf49af771dbc6 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Thu, 6 Jan 2000 21:49:20 +0000 Subject: [PATCH] (krb5_sname_to_principal): remove `hp' git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7747 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/principal.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/krb5/principal.c b/lib/krb5/principal.c index e28b04159..adb94d2b8 100644 --- a/lib/krb5/principal.c +++ b/lib/krb5/principal.c @@ -866,7 +866,6 @@ krb5_sname_to_principal (krb5_context context, krb5_error_code ret; char localhost[128]; char **realms, *host = NULL; - struct hostent *hp = NULL; if(type != KRB5_NT_SRV_HST && type != KRB5_NT_UNKNOWN) return KRB5_SNAME_UNSUPP_NAMETYPE; @@ -901,16 +900,12 @@ krb5_sname_to_principal (krb5_context context, } ret = krb5_get_host_realm(context, hostname, &realms); if(ret) { - if (hp != NULL) - freehostent (hp); return ret; } ret = krb5_make_principal(context, ret_princ, realms[0], sname, hostname, NULL); if(host) free(host); - if (hp) - freehostent (hp); krb5_free_host_realm(context, realms); return ret; }