Fix memory leak on error path of limit_krb5_enctypes()
authorKevin Coffman <kwc@citi.umich.edu>
Fri, 30 Mar 2007 22:32:08 +0000 (18:32 -0400)
committerNeil Brown <neilb@suse.de>
Fri, 30 Mar 2007 23:08:01 +0000 (09:08 +1000)
Return credential on error path of limit_krb5_enctypes()

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/gssd/krb5_util.c

index f1682b8..a0ee110 100644 (file)
@@ -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;