Commit 0d27829a authored by Wim Taymans's avatar Wim Taymans
Browse files

udpsink: avoid leaking the host

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701586
parent 74d217c4
......@@ -125,11 +125,18 @@ gst_udpsink_finalize (GstUDPSink * udpsink)
static gboolean
gst_udpsink_set_uri (GstUDPSink * sink, const gchar * uri, GError ** error)
{
gchar *host;
guint16 port;
gst_multiudpsink_remove (GST_MULTIUDPSINK (sink), sink->host, sink->port);
if (!gst_udp_parse_uri (uri, &sink->host, &sink->port))
if (!gst_udp_parse_uri (uri, &host, &port))
goto wrong_uri;
g_free (sink->host);
sink->host = host;
sink->port = port;
g_free (sink->uri);
sink->uri = g_strdup (uri);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment