From c37f378532180f551497cda46d9ae0b0a6ff6b9d Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 3 Oct 2024 10:36:19 -0400 Subject: [PATCH] MT#55283 fix possible null dereference Change-Id: I478241ffe234c01d2b34ffb37837417fafcdb49f Warned-by: Coverity --- daemon/call.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index 46e735ae7..60518f1c1 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2910,7 +2910,8 @@ static void __media_init_from_flags(struct call_media *other_media, struct call_ if (flags->opmode == OP_OFFER) { ilog(LOG_DEBUG, "setting other slot to %u, setting slot to %u", flags->media_rec_slot_offer, flags->media_rec_slot_answer); other_media->media_rec_slot = flags->media_rec_slot_offer; - media->media_rec_slot = flags->media_rec_slot_answer; + if (media) + media->media_rec_slot = flags->media_rec_slot_answer; } /* bandwidth */