Skip to contentSkip to conversation

Dead code in net/sunrpc/auth_gss/auth_gss.c

PATCH In review Eric Sesterhenn 2 participants 2 messages Apr 18, 2006

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

net/sunrpc/auth_gss/auth_gss.c renamed from net/sunrpc/auth_gss/auth_gss.c.orig +0 -1
@@ -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);
 }
 
#1 lore raw
Quoted 9 lines · Eric Sesterhenn

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

I'll take it, but please send sunrpc patches to the NFS lists, not netdev.

Cheers,
Trond

Quoted 16 lines
net/sunrpc/auth_gss/auth_gss.c renamed from net/sunrpc/auth_gss/auth_gss.c.orig +0 -2
@@ -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);
 }
 
 
 
-

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html