X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=server.c;h=091c1613662f66b3eec6f609ab782304a4ecc097;hb=81b3c86f086cb2340d1c5596202a307487216b21;hp=38626998f279467695fbb27d161ada37f5adbedd;hpb=7903bf87725b18495a06f7199342f167147712eb;p=fio.git diff --git a/server.c b/server.c index 38626998..091c1613 100644 --- a/server.c +++ b/server.c @@ -578,8 +578,12 @@ static int fio_net_queue_cmd(uint16_t opcode, void *buf, off_t size, struct sk_entry *entry; entry = fio_net_prep_cmd(opcode, buf, size, tagptr, flags); - fio_net_queue_entry(entry); - return 0; + if (entry) { + fio_net_queue_entry(entry); + return 0; + } + + return 1; } static int fio_net_send_simple_stack_cmd(int sk, uint16_t opcode, uint64_t tag) @@ -1999,10 +2003,8 @@ int fio_server_get_verify_state(const char *name, int threadnumber, dprint(FD_NET, "server: request verify state\n"); rep = smalloc(sizeof(*rep)); - if (!rep) { - log_err("fio: smalloc pool too small\n"); + if (!rep) return ENOMEM; - } __fio_mutex_init(&rep->lock, FIO_MUTEX_LOCKED); rep->data = NULL;