summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-01-20 12:17:54 -0700
committerJens Axboe <axboe@fb.com>2016-01-20 12:17:54 -0700
commit2baadb02756d2abaf7ba0fd8bb1cfb6b83f887c1 (patch)
treeee6b3bd385cdbaf4ff1298052c9758395f8325e3
parent54e62ad43c0432a610b102eb82842176b482d18c (diff)
downloadfio-2baadb02756d2abaf7ba0fd8bb1cfb6b83f887c1.tar.gz
fio-2baadb02756d2abaf7ba0fd8bb1cfb6b83f887c1.tar.bz2
client: fix non-text command leak
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--client.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/client.c b/client.c
index c61301de..2541f462 100644
--- a/client.c
+++ b/client.c
@@ -226,13 +226,12 @@ static void fio_drain_client_text(struct fio_client *client)
if (!cmd)
break;
- if (cmd->opcode != FIO_NET_CMD_TEXT) {
- free(cmd);
- continue;
+ if (cmd->opcode == FIO_NET_CMD_TEXT) {
+ convert_text(cmd);
+ client->ops->text(client, cmd);
}
- convert_text(cmd);
- client->ops->text(client, cmd);
+ free(cmd);
} while (1);
}