From 4a6e7cdac0335d06f2d728336c7ca48802196ed7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 9 Nov 2018 15:16:53 -0800 Subject: [PATCH] s4: lib: Coverity CID: 1437973 - add comment explaining why this is a false positive. Signed-off-by: Jeremy Allison --- source4/lib/messaging/messaging.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 935951f3fba..cfd1993e482 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -470,6 +470,13 @@ static void imessaging_post_handler(struct tevent_context *ev, imessaging_dgm_recv(ev, state->buf, state->buf_len, NULL, 0, state->msg_ctx); + /* + * NB. The check below is neccessary (depite what Coverity + * might say :-) as the destructor for the struct imessaging_post_state + * can NULL out the local 'state' variable via the state->busy_ref + * pointer above. + */ + if (state == NULL) { return; } -- 2.19.1.930.g4563a0d9d0-goog