]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip_session: Fixed NULL active media topology handle
authorSungtae Kim <pchero21@gmail.com>
Sun, 13 Dec 2020 12:03:32 +0000 (13:03 +0100)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 23 Dec 2020 19:55:28 +0000 (13:55 -0600)
Added NULL pointer check to prevent Asterisk crash.

ASTERISK-29215

Change-Id: If07e50ea8d78cb610af9195fc13b5dca4bfcef95

res/res_pjsip_session.c

index 696835414e92a6f56dac91ecb636b2d15159c938..358ef969cf493d6ab9c94b9635308ed0f08f99e4 100644 (file)
@@ -2280,7 +2280,7 @@ static int sip_session_refresh(struct ast_sip_session *session,
                                        ast_sip_session_get_name(session));
                        }
 
-                       if (active_media_state) {
+                       if (active_media_state && active_media_state->topology) {
                                struct ast_sip_session_media_state *new_pending_state;
                                /*
                                 * We need to check if the passed in active and pending states are equal