[PATCH] Coverity fixes

Jeremy Allison jra at samba.org
Fri Apr 17 11:45:52 MDT 2015


On Fri, Apr 17, 2015 at 05:21:59PM +0530, Anoop C S wrote:
> Hi all,
> 
> Reviews for the attached patches are welcomed.

Reviewed-by: Jeremy Allison <jra at samba.org>

Can I get a second Team reviewer please ?

Cheers,

	Jeremy.

> >From b2eec29419d97530b532de61f2515bb691d70eb5 Mon Sep 17 00:00:00 2001
> From: Anoop C S <achiraya at redhat.com>
> Date: Wed, 15 Apr 2015 15:56:42 +0530
> Subject: [PATCH 1/2] rpc_server/srvsvc: Fix CID 241162 Logically dead code
> 
> Signed-off-by: Anoop C S <achiraya at redhat.com>
> ---
>  source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
> index 7e42272..bbbdefe 100644
> --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
> +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
> @@ -1874,7 +1874,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
>  				get_dyn_CONFIGFILE(),
>  				share_name,
>  				path,
> -				comment ? comment : "",
> +				comment,
>  				max_connections,
>  				csc_policy);
>  		if (!command) {
> -- 
> 2.1.0
> 

> >From df8f01bf1164991bb1e4dd0207715844f57c8995 Mon Sep 17 00:00:00 2001
> From: Anoop C S <achiraya at redhat.com>
> Date: Wed, 15 Apr 2015 16:34:35 +0530
> Subject: [PATCH 2/2] libads: Fix CID 1272956 Fixing wrong if condition
> 
> Signed-off-by: Anoop C S <achiraya at redhat.com>
> ---
>  source3/libads/authdata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/source3/libads/authdata.c b/source3/libads/authdata.c
> index d3a0992..b4a1b84 100644
> --- a/source3/libads/authdata.c
> +++ b/source3/libads/authdata.c
> @@ -239,7 +239,7 @@ NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
>  	}
>  
>  	gensec_settings = lpcfg_gensec_settings(tmp_ctx, lp_ctx);
> -	if (lp_ctx == NULL) {
> +	if (gensec_settings == NULL) {
>  		status = NT_STATUS_NO_MEMORY;
>  		DEBUG(10, ("lpcfg_gensec_settings failed\n"));
>  		goto out;
> -- 
> 2.1.0
> 



More information about the samba-technical mailing list