diff options
author | Joshua Colp <jcolp@digium.com> | 2017-07-26 16:39:32 +0000 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2017-08-01 15:46:00 -0600 |
commit | 98626a3f9a4dbcd50a115bdc6901f18a8f854da0 (patch) | |
tree | f08895c60f8c5d339fa631d37f4b18927026e72d | |
parent | 2eca0c083ef14eb282e8850175ac71ef622ec479 (diff) |
res_pjsip_session: Release media resources on session end quicker.
A change was made long ago where the session was kept around
until the underlying INVITE session had been destroyed. This
had the side effect of also keeping the underlying media resources
around for this time as well.
This change ensures that when we know the session is ending we
release the media resources immediately.
ASTERISK-27110
Change-Id: I3c6a82fe7d2c50b9dc9197cb12ef22f20d337501
-rw-r--r-- | res/res_pjsip_session.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c index d91f6ff2b..2eb111ce8 100644 --- a/res/res_pjsip_session.c +++ b/res/res_pjsip_session.c @@ -2554,6 +2554,11 @@ static int session_end(void *vsession) iter->session_end(session); } } + + /* Release any media resources. */ + ao2_cleanup(session->media); + session->media = NULL; + return 0; } |