From 9a6cf25c17c4a7d69600d3802ea8c990cd317b9f Mon Sep 17 00:00:00 2001 From: Kevin Coffman Date: Fri, 30 Mar 2007 18:32:08 -0400 Subject: [PATCH] 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 --- utils/gssd/krb5_util.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.5