From df81ad1c937d9e620e6777c84500d81536a98982 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 2 Jan 2023 20:38:02 -0600 Subject: [PATCH] spnego: Quiet warning in ret_spnego_context() --- lib/gssapi/spnego/context_storage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/gssapi/spnego/context_storage.c b/lib/gssapi/spnego/context_storage.c index 13e20d723..ab3df0e31 100644 --- a/lib/gssapi/spnego/context_storage.c +++ b/lib/gssapi/spnego/context_storage.c @@ -207,7 +207,9 @@ ret_spnego_context(krb5_storage *sp, gssspnego_ctx *ctxp) struct negoex_auth_mech *mech; CHECK(ret, ret_negoex_auth_mech(sp, &mech)); - HEIM_TAILQ_INSERT_TAIL(&ctx->negoex_mechs, mech, links); + /* `mech' will not be NULL here, but quiet scan-build */ + if (mech) + HEIM_TAILQ_INSERT_TAIL(&ctx->negoex_mechs, mech, links); } }