rtspclientsink: Don't leak previous server_ip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5497>
This commit is contained in:
Doug Nazar 2021-05-13 22:25:55 -04:00 committed by GStreamer Marge Bot
parent 65aa1b8faa
commit 0b6268393c

View file

@ -3262,6 +3262,7 @@ gst_rtsp_client_sink_connect_to_server (GstRTSPClientSink * sink,
sa = g_socket_get_remote_address (conn_socket, NULL); sa = g_socket_get_remote_address (conn_socket, NULL);
ia = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (sa)); ia = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (sa));
g_free (sink->server_ip);
sink->server_ip = g_inet_address_to_string (ia); sink->server_ip = g_inet_address_to_string (ia);
g_object_unref (sa); g_object_unref (sa);