From: Kevin Coffman Date: Fri, 30 Mar 2007 22:32:08 +0000 (-0400) Subject: Fix memory leak on error path of limit_krb5_enctypes() X-Git-Tag: nfs-utils-1-1-0-rc2~21 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=9a6cf25c17c4a7d69600d3802ea8c990cd317b9f;p=nfs-utils.git Fix memory leak on error path of limit_krb5_enctypes() Return credential on error path of limit_krb5_enctypes() Signed-off-by: Kevin Coffman Signed-off-by: Neil Brown --- diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c index f1682b8..a0ee110 100644 --- a/utils/gssd/krb5_util.c +++ b/utils/gssd/krb5_util.c @@ -298,6 +298,7 @@ limit_krb5_enctypes(struct rpc_gss_sec *sec, uid_t uid) if (maj_stat != GSS_S_COMPLETE) { pgsserr("gss_set_allowable_enctypes", maj_stat, min_stat, &krb5oid); + gss_release_cred(&min_stat, &credh); return -1; } sec->cred = credh;