diff options
author | luis <ldearquer@gmail.com> | 2015-05-05 13:45:49 +0200 |
---|---|---|
committer | luis <ldearquer@gmail.com> | 2015-05-05 13:45:49 +0200 |
commit | 2a6366f03996e6736516d65a02afdb370e282af9 (patch) | |
tree | aad907391faee886ede2761bc7dfc1dccbe583d0 | |
parent | d17518aadb0ffcba54ed4fdf7ca08b01b70c9eb7 (diff) |
Make GList clients consistent (items valid always).
-rw-r--r-- | http-launch/src/http-launch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http-launch/src/http-launch.c b/http-launch/src/http-launch.c index 38b4400..2521f3b 100644 --- a/http-launch/src/http-launch.c +++ b/http-launch/src/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); } |