summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/gstrtpbin.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-12-12 12:11:53 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-12-12 12:11:53 +0000
commit4e481affe2d802842444d735cdd1fb7c2e351d37 (patch)
tree03a69fd03da08d35ff81a79ae246b3034c9f3f76 /gst/rtpmanager/gstrtpbin.c
parent4d9802a3acfaa8a2a9dc04a4009e2b5377dcd89d (diff)
downloadgst-plugins-bad-4e481affe2d802842444d735cdd1fb7c2e351d37.tar.gz
gst-plugins-bad-4e481affe2d802842444d735cdd1fb7c2e351d37.tar.bz2
gst-plugins-bad-4e481affe2d802842444d735cdd1fb7c2e351d37.zip
gst/rtpmanager/: Fix some leaks.
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_finalize), (gst_rtp_bin_set_sdes_string), (gst_rtp_bin_get_sdes_string), (gst_rtp_bin_handle_message): * gst/rtpmanager/rtpsession.c: (rtp_session_finalize), (rtp_session_send_bye): * gst/rtpmanager/rtpsource.c: (rtp_source_finalize): Fix some leaks.
Diffstat (limited to 'gst/rtpmanager/gstrtpbin.c')
-rw-r--r--gst/rtpmanager/gstrtpbin.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 9277a8b1..9d6689d2 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -1294,9 +1294,13 @@ static void
gst_rtp_bin_finalize (GObject * object)
{
GstRtpBin *rtpbin;
+ gint i;
rtpbin = GST_RTP_BIN (object);
+ for (i = 0; i < 9; i++)
+ g_free (rtpbin->sdes[i]);
+
g_mutex_free (rtpbin->priv->bin_lock);
gst_object_unref (rtpbin->provided_clock);
@@ -1347,6 +1351,9 @@ gst_rtp_bin_set_sdes_string (GstRtpBin * bin, GstRTCPSDESType type,
GSList *item;
const gchar *name;
+ if (type < 0 || type > 8)
+ return;
+
GST_OBJECT_LOCK (bin);
g_free (bin->sdes[type]);
bin->sdes[type] = g_strdup (data);
@@ -1362,6 +1369,9 @@ gst_rtp_bin_get_sdes_string (GstRtpBin * bin, GstRTCPSDESType type)
{
gchar *result;
+ if (type < 0 || type > 8)
+ return NULL;
+
GST_OBJECT_LOCK (bin);
result = g_strdup (bin->sdes[type]);
GST_OBJECT_UNLOCK (bin);