projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
18064c1
)
server: use scalloc() for sk_out allocation
author
Jens Axboe
<axboe@kernel.dk>
Thu, 22 Mar 2018 17:29:25 +0000
(11:29 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 22 Mar 2018 17:29:25 +0000
(11:29 -0600)
This informs valgrind that it's properly initialized.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
server.c
patch
|
blob
|
blame
|
history
diff --git
a/server.c
b/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 = s
malloc(
sizeof(*sk_out));
+ sk_out = s
calloc(1,
sizeof(*sk_out));
if (!sk_out) {
close(sk);
return -1;