[PATCH] Coverity fixes.

Stefan Metzmacher metze at samba.org
Fri Nov 9 23:02:12 UTC 2018


Am 09.11.18 um 22:25 schrieb Jeremy Allison via samba-technical:
> Subject: [PATCH 1/2] s4: lib: messaging. Fix dead code. Coverity CID: 1437973
> 
> Signed-off-by: Jeremy Allison <jra at samba.org>
> ---
>  source4/lib/messaging/messaging.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
> index 935951f3fba..dada565d1be 100644
> --- a/source4/lib/messaging/messaging.c
> +++ b/source4/lib/messaging/messaging.c
> @@ -470,10 +470,6 @@ static void imessaging_post_handler(struct tevent_context *ev,
>  	imessaging_dgm_recv(ev, state->buf, state->buf_len, NULL, 0,
>  			    state->msg_ctx);
>  
> -	if (state == NULL) {
> -		return;
> -	}
> -
>  	state->busy_ref = NULL;
>  	TALLOC_FREE(state);
>  }

This is wrong! See a08ab2940051ae47ce71149087a24d060227ef19

imessaging_post_state_destructor() may set state = NULL,
via the state->busy_ref pointer.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181110/3468bf62/signature.sig>


More information about the samba-technical mailing list