Make it clear to Coverity that the tmp buffer in switch_ioscheduler() is \0-terminated
[fio.git] / server.c
index 15dc2c4b38ba3e01682cf85401458caa2d0421d4..d3f69774165f8add2cab5d998989e31866ff173c 100644 (file)
--- a/server.c
+++ b/server.c
@@ -1359,7 +1359,7 @@ static int accept_loop(int listen_sk)
 
                dprint(FD_NET, "server: connect from %s\n", from);
 
-               sk_out = smalloc(sizeof(*sk_out));
+               sk_out = scalloc(1, sizeof(*sk_out));
                if (!sk_out) {
                        close(sk);
                        return -1;