From f5de8db140ff18ad5bfa384969a5f0a30e83d753 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 25 Jul 2018 15:16:32 +0900 Subject: [PATCH] srtclientsink: Do not leak string https://bugzilla.gnome.org/show_bug.cgi?id=796842 --- ext/srt/gstsrtclientsink.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ext/srt/gstsrtclientsink.c b/ext/srt/gstsrtclientsink.c index 7c077b9..3ab0983 100644 --- a/ext/srt/gstsrtclientsink.c +++ b/ext/srt/gstsrtclientsink.c @@ -151,6 +151,17 @@ gst_srt_client_sink_set_property (GObject * object, } } +static void +gst_srt_client_sink_finalize (GObject * object) +{ + GstSRTClientSink *self = GST_SRT_CLIENT_SINK (object); + GstSRTClientSinkPrivate *priv = GST_SRT_CLIENT_SINK_GET_PRIVATE (self); + + g_free (priv->bind_address); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + static gboolean gst_srt_client_sink_start (GstBaseSink * sink) { @@ -239,6 +250,7 @@ gst_srt_client_sink_class_init (GstSRTClientSinkClass * klass) gobject_class->set_property = gst_srt_client_sink_set_property; gobject_class->get_property = gst_srt_client_sink_get_property; + gobject_class->finalize = gst_srt_client_sink_finalize; properties[PROP_POLL_TIMEOUT] = g_param_spec_int ("poll-timeout", "Poll Timeout", -- 2.7.4