summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorluis <ldearquer@gmail.com>2015-05-05 13:45:49 +0200
committerluis <ldearquer@gmail.com>2015-05-05 13:45:49 +0200
commit58a2c722d9c833aa2c583572f5a269a027f0fc8a (patch)
tree469823baeb98846543b0cc5a1b1f808014120ff2 /network
parentebe2883488b39f7311fdb65875f844e752239a7b (diff)
network/http-launch: Make GList clients consistent (items valid always).
Diffstat (limited to 'network')
-rw-r--r--network/http-launch/http-launch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/network/http-launch/http-launch.c b/network/http-launch/http-launch.c
index 38b4400..2521f3b 100644
--- a/network/http-launch/http-launch.c
+++ b/network/http-launch/http-launch.c
@@ -54,6 +54,10 @@ remove_client (Client * client)
{
g_print ("Removing connection %s\n", client->name);
+ G_LOCK (clients);
+ clients = g_list_remove (clients, client);
+ G_UNLOCK (clients);
+
g_free (client->name);
if (client->isource) {
@@ -67,10 +71,6 @@ remove_client (Client * client)
g_object_unref (client->connection);
g_byte_array_unref (client->current_message);
- G_LOCK (clients);
- clients = g_list_remove (clients, client);
- G_UNLOCK (clients);
-
g_slice_free (Client, client);
}