From fbc2a12aa59eaf3bd8f02eb0fb01929e25580e70 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Wed, 9 Apr 2008 22:27:50 +0000 Subject: gst/rtpmanager/: Avoid leaking pads in the RTP manager. Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (free_session): * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_finalize): Avoid leaking pads in the RTP manager. --- gst/rtpmanager/gstrtpsession.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gst/rtpmanager/gstrtpsession.c') diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 6de1d3f3..3f7053d7 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -705,6 +705,15 @@ gst_rtp_session_finalize (GObject * object) rtpsession = GST_RTP_SESSION (object); + if (rtpsession->recv_rtp_sink != NULL) + gst_object_unref (rtpsession->recv_rtp_sink); + if (rtpsession->recv_rtcp_sink != NULL) + gst_object_unref (rtpsession->recv_rtcp_sink); + if (rtpsession->send_rtp_sink != NULL) + gst_object_unref (rtpsession->send_rtp_sink); + if (rtpsession->send_rtcp_src != NULL) + gst_object_unref (rtpsession->send_rtcp_src); + g_hash_table_destroy (rtpsession->priv->ptmap); g_mutex_free (rtpsession->priv->lock); g_object_unref (rtpsession->priv->session); -- cgit v1.2.1