client: fix GSocketAddress leak in gst_rtsp_client_accept

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677463
This commit is contained in:
David Svensson Fors 2012-06-06 14:49:02 +02:00 committed by Wim Taymans
parent a9bf210747
commit 7b145aeeab

View file

@ -1910,6 +1910,7 @@ gst_rtsp_client_accept (GstRTSPClient * client, GSocket * socket,
addrlen = sizeof (addr);
if (!g_socket_address_to_native (addres, &addr, addrlen, error))
goto native_failed;
g_object_unref (addres);
if (getnameinfo ((struct sockaddr *) &addr, addrlen, ip, sizeof (ip), NULL, 0,
NI_NUMERICHOST) != 0)
@ -1960,6 +1961,7 @@ no_address:
}
native_failed:
{
g_object_unref (addres);
GST_ERROR ("could not get native address %s", (*error)->message);
return FALSE;
}