From 05e9b5f1313781f82ea527f1ae5dd34063ecf2ee Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Sun, 8 Aug 2021 16:58:59 -0400 Subject: [PATCH] TT#91151 avoid possible null pointer Warned-by: coverity Change-Id: Ic841c9926e6f07817a0ec17528db2faaadc2f0c9 --- daemon/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index 0373adf8c..6a9805ae0 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1576,7 +1576,7 @@ static void __generate_crypto(const struct sdp_ng_flags *flags, struct call_medi // make sure our bit field is large enough assert(num_crypto_suites <= sizeof(types_offered) * 8); - for (GList *l = offered_cpq->head; l; l = l->next) { + for (GList *l = offered_cpq ? offered_cpq->head : NULL; l; l = l->next) { struct crypto_params_sdes *offered_cps = l->data; struct crypto_params_sdes *cps = g_slice_alloc0(sizeof(*cps));