From: Eric Sesterhenn Date: Wed, 19 Apr 2006 17:06:49 +0000 (-0400) Subject: SUNRPC: Dead code in net/sunrpc/auth_gss/auth_gss.c X-Git-Tag: v2.6.17-rc3~80^2 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=commitdiff_plain;h=a5f9145bc9c340bda743ad51e09bdea60fa3ddfa SUNRPC: Dead code in net/sunrpc/auth_gss/auth_gss.c 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 Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 900ef31f5a0e..519ebc17c028 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -794,7 +794,6 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) 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); }