Fix possible use-after-free on client disconnect
[fio.git] / client.c
index fbeac35bfb30dd46635edfab70a6adb851b81c0e..fda16b8e5e6c62233e6ff6f5e5abf763aee8a35e 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1015,8 +1015,7 @@ int fio_handle_clients(void)
                                                client->hostname);
                                remove_client(client);
                                retval = 1;
-                       }
-                       if (client->error)
+                       } else if (client->error)
                                retval = 1;
                }
        }