TT#91151 avoid possible null pointer

Warned-by: coverity

Change-Id: Ic841c9926e6f07817a0ec17528db2faaadc2f0c9
pull/1346/head
Richard Fuchs 4 years ago
parent f2f45a0836
commit 05e9b5f131

@ -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));

Loading…
Cancel
Save