mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
udpsink: avoid leaking the host
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701586
This commit is contained in:
parent
74d217c44b
commit
0d27829a6b
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue