From 9b292dcd89aa621e4c5d1be002f8f4b281f07564 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 15 Aug 2024 07:54:52 -0400 Subject: [PATCH] MT#60688 fix possible NULL dereference Change-Id: I780b7034e5cbf5c1d8ddc53ee7f17975d5f3ebd7 Warned-by: Coverity --- daemon/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index af62e35e6..2969baa26 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2848,7 +2848,7 @@ static void __media_init_from_flags(struct call_media *other_media, struct call_ if (!MEDIA_ISSET(other_media, PTIME_OVERRIDE)) other_media->ptime = sp->ptime; } - if (sp->maxptime > 0) { + if (media && sp->maxptime > 0) { media->maxptime = sp->maxptime; } if (media && flags->ptime > 0) {