summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/gstrtpsession.c
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2008-04-09 22:27:50 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:34 +0100
commit959c341cbda42c05aaa8b3bb4b1712c99205a7fc (patch)
tree2fdb332462dc17903b77651d8e85201080f8f6ef /gst/rtpmanager/gstrtpsession.c
parent3f5884708033ba3579e24b22ce3bb44657eec66f (diff)
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.
Diffstat (limited to 'gst/rtpmanager/gstrtpsession.c')
-rw-r--r--gst/rtpmanager/gstrtpsession.c9
1 files changed, 9 insertions, 0 deletions
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);