From: Trond Myklebust RPCSEC_GSS: Fix two more memory leaks found by the stanford checker. --- net/sunrpc/auth_gss/gss_mech_switch.c | 1 + net/sunrpc/auth_gss/gss_pseudoflavors.c | 1 + 2 files changed, 2 insertions(+) diff -puN net/sunrpc/auth_gss/gss_mech_switch.c~nfs-09-memleaks net/sunrpc/auth_gss/gss_mech_switch.c --- 25/net/sunrpc/auth_gss/gss_mech_switch.c~nfs-09-memleaks 2004-01-09 22:16:13.000000000 -0800 +++ 25-akpm/net/sunrpc/auth_gss/gss_mech_switch.c 2004-01-09 22:16:13.000000000 -0800 @@ -70,6 +70,7 @@ gss_mech_register(struct xdr_netobj * me } gm->gm_oid.len = mech_type->len; if (!(gm->gm_oid.data = kmalloc(mech_type->len, GFP_KERNEL))) { + kfree(gm); printk("Failed to allocate memory in gss_mech_register"); return -1; } diff -puN net/sunrpc/auth_gss/gss_pseudoflavors.c~nfs-09-memleaks net/sunrpc/auth_gss/gss_pseudoflavors.c --- 25/net/sunrpc/auth_gss/gss_pseudoflavors.c~nfs-09-memleaks 2004-01-09 22:16:13.000000000 -0800 +++ 25-akpm/net/sunrpc/auth_gss/gss_pseudoflavors.c 2004-01-09 22:16:13.000000000 -0800 @@ -92,6 +92,7 @@ gss_register_triple(u32 pseudoflavor, st return 0; err_unlock: + kfree(triple); spin_unlock(®istered_triples_lock); err: return -1; _