diff mbox

[0/4] Add support for new RPCSEC_GSS upcall mechanism for nfsd

Message ID 20120712224207.GG24162@fieldses.org (mailing list archive)
State New, archived
Headers show

Commit Message

J. Bruce Fields July 12, 2012, 10:42 p.m. UTC
On Thu, Jul 12, 2012 at 06:05:17PM -0400, Simo Sorce wrote:
> On Thu, 2012-07-12 at 08:39 -0400, J. Bruce Fields wrote:
> > And this is reproduceable after applying the first patch
> > ("conditionally
> > return endtime...") but not before.  The patch seems obviously
> > innocent,
> > but maybe my eyes are playing tricks on me.
> > 
> missing braces around the if statement where I inserted the if (endtime)
> contion, causing instead to always kfree(ctx)
> 
> Sorry about that, it completely escaped my review of it multiple times
> over.

I also looked straight at it without seeing it.  It's tough to make my
eyes not trust the indentation!

--b.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index a32bb4f..3bc4a23 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -695,11 +695,11 @@  gss_import_sec_context_kerberos(const void *p, size_t len,
 	else
 		ret = gss_import_v2_context(p, end, ctx, gfp_mask);
 
-	if (ret == 0)
+	if (ret == 0) {
 		ctx_id->internal_ctx_id = ctx;
 		if (endtime)
 			*endtime = ctx->endtime;
-	else
+	} else
 		kfree(ctx);
 
 	dprintk("RPC:       %s: returning %d\n", __func__, ret);