From 87c6f22bf24da4679849ccf778451b8432c2b368 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 22 Mar 2018 11:29:25 -0600 Subject: [PATCH 1/1] server: use scalloc() for sk_out allocation This informs valgrind that it's properly initialized. Signed-off-by: Jens Axboe --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.c b/server.c index 15dc2c4b..d3f69774 100644 --- 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; -- 2.25.1