mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
network/http-launch: Make GList clients consistent (items valid always).
This commit is contained in:
parent
ebe2883488
commit
58a2c722d9
1 changed files with 4 additions and 4 deletions
|
@ -54,6 +54,10 @@ remove_client (Client * client)
|
||||||
{
|
{
|
||||||
g_print ("Removing connection %s\n", client->name);
|
g_print ("Removing connection %s\n", client->name);
|
||||||
|
|
||||||
|
G_LOCK (clients);
|
||||||
|
clients = g_list_remove (clients, client);
|
||||||
|
G_UNLOCK (clients);
|
||||||
|
|
||||||
g_free (client->name);
|
g_free (client->name);
|
||||||
|
|
||||||
if (client->isource) {
|
if (client->isource) {
|
||||||
|
@ -67,10 +71,6 @@ remove_client (Client * client)
|
||||||
g_object_unref (client->connection);
|
g_object_unref (client->connection);
|
||||||
g_byte_array_unref (client->current_message);
|
g_byte_array_unref (client->current_message);
|
||||||
|
|
||||||
G_LOCK (clients);
|
|
||||||
clients = g_list_remove (clients, client);
|
|
||||||
G_UNLOCK (clients);
|
|
||||||
|
|
||||||
g_slice_free (Client, client);
|
g_slice_free (Client, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue