]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6460 --resolve fix leaked RTP ports that cause mod_skinny to fail after N calls
authorNathan Neulinger <nneul@neulinger.org>
Mon, 14 Apr 2014 18:22:24 +0000 (13:22 -0500)
committerNathan Neulinger <nneul@neulinger.org>
Mon, 14 Apr 2014 18:22:24 +0000 (13:22 -0500)
src/mod/endpoints/mod_skinny/mod_skinny.c

index 5ceac067484a4fd1a00663231e43af6ae4d65734..adcc1d922ad4146980f562843bc682f0c56ef7ce 100644 (file)
@@ -875,6 +875,10 @@ switch_status_t channel_on_destroy(switch_core_session_t *session)
                if (switch_core_codec_ready(&tech_pvt->write_codec)) {
                        switch_core_codec_destroy(&tech_pvt->write_codec);
                }
+
+               if (switch_rtp_ready(tech_pvt->rtp_session)) {
+                       switch_rtp_destroy(&tech_pvt->rtp_session);
+               }
        }
 
        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s CHANNEL DESTROY\n", switch_channel_get_name(channel));