Fix possible use-after-free on client disconnect
authorJens Axboe <axboe@kernel.dk>
Mon, 17 Oct 2011 11:31:33 +0000 (13:31 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Oct 2011 11:31:33 +0000 (13:31 +0200)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
client.c

index fbeac35..fda16b8 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;
                }
        }