netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] Dead code in net/sunrpc/auth_gss/auth_gss.c
@ 2006-04-18 16:07 Eric Sesterhenn
  2006-04-18 16:34 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2006-04-18 16:07 UTC (permalink / raw)
  To: netdev; +Cc: dugsong

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 <snakebyte@gmx.de>

--- 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);
 }
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] Dead code in net/sunrpc/auth_gss/auth_gss.c
  2006-04-18 16:07 [Patch] Dead code in net/sunrpc/auth_gss/auth_gss.c Eric Sesterhenn
@ 2006-04-18 16:34 ` Trond Myklebust
  0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2006-04-18 16:34 UTC (permalink / raw)
  To: Eric Sesterhenn; +Cc: netdev, dugsong

On Tue, 2006-04-18 at 18:07 +0200, Eric Sesterhenn wrote:
> 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 <snakebyte@gmx.de>
> 

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

Cheers,
  Trond

> --- 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);
>  }
>  
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-18 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-18 16:07 [Patch] Dead code in net/sunrpc/auth_gss/auth_gss.c Eric Sesterhenn
2006-04-18 16:34 ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).