Subject: [Patch] Dead code in net/sunrpc/auth_gss/auth_gss.c

From: Eric Sesterhenn <[email-masked]>
Date: Tue, 18 Apr 2006 18:07:11 +0200

Hi,

the coverity checker spotted that cred is always NULL
when we jump to out_err ( there is just one case, when
we fail to allocate the memory for cred )
This is Coverity ID #79

Signed-off-by: Eric Sesterhenn <[email-masked]>

--- linux-2.6.17-rc1/net/sunrpc/auth_gss/auth_gss.c.orig	2006-04-18 13:23:22.000000000 +0200
+++ linux-2.6.17-rc1/net/sunrpc/auth_gss/auth_gss.c	2006-04-18 13:24:10.000000000 +0200
@@ -794,7 +794,6 @@ gss_create_cred(struct rpc_auth *auth, s
 
 out_err:
 	dprintk("RPC:      gss_create_cred failed with error %d\n", err);
-	if (cred) gss_destroy_cred(&cred->gc_base);
 	return ERR_PTR(err);
 }