}
}
-static const gchar *
+static gchar *
do_resolve (const gchar * host)
{
struct hostent *hostinfo;
sizeof (ipbuf));
#endif /* G_OS_WIN32 */
}
- return ip;
+ return g_strdup (ip);
/* ERRORS */
not_resolved:
guint idx, line;
gint retval;
GstClockTime to;
- const gchar *ip;
+ gchar *ip;
guint16 port;
gchar codestr[4], *resultstr;
gint code;
/* connect to the host/port */
res = do_connect (ip, port, &conn->fd1, conn->fdset, timeout);
+ g_free (ip);
if (res != GST_RTSP_OK)
goto connect_failed;
gst_rtsp_connection_connect (GstRTSPConnection * conn, GTimeVal * timeout)
{
GstRTSPResult res;
- const gchar *ip;
+ gchar *ip;
guint16 port;
GstRTSPUrl *url;
goto connect_failed;
g_free (conn->ip);
- conn->ip = g_strdup (ip);
+ conn->ip = ip;
/* this is our read URL */
conn->readfd = &conn->fd0;
connect_failed:
{
GST_ERROR ("failed to connect");
+ g_free (ip);
return res;
}
tunneling_failed: