Skip to content
Snippets Groups Projects
Commit 1340e212 authored by Wim Taymans's avatar Wim Taymans
Browse files

media: don't leak the destination address

parent 9bed89c3
No related branches found
No related tags found
Loading
...@@ -713,18 +713,19 @@ find_transport (GstRTSPMediaStream *stream, const gchar *rtcp_from) ...@@ -713,18 +713,19 @@ find_transport (GstRTSPMediaStream *stream, const gchar *rtcp_from)
{ {
GList *walk; GList *walk;
GstRTSPMediaTrans *result = NULL; GstRTSPMediaTrans *result = NULL;
const gchar *dest; const gchar *tmp;
gchar *dest;
guint port; guint port;
if (rtcp_from == NULL) if (rtcp_from == NULL)
return NULL; return NULL;
dest = g_strrstr (rtcp_from, ":"); tmp = g_strrstr (rtcp_from, ":");
if (dest == NULL) if (tmp == NULL)
return NULL; return NULL;
port = atoi (dest + 1); port = atoi (tmp + 1);
dest = g_strndup (rtcp_from, dest - rtcp_from); dest = g_strndup (rtcp_from, tmp - rtcp_from);
g_message ("finding %s:%d", dest, port); g_message ("finding %s:%d", dest, port);
...@@ -740,6 +741,8 @@ find_transport (GstRTSPMediaStream *stream, const gchar *rtcp_from) ...@@ -740,6 +741,8 @@ find_transport (GstRTSPMediaStream *stream, const gchar *rtcp_from)
break; break;
} }
} }
g_free (dest);
return result; return result;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment