diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-12-29 19:42:54 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-12-29 19:42:54 +0300 |
commit | 30a83a115974b1898e666eefe206597b897c06b4 (patch) | |
tree | 53f5ca77e321c3df1aead45f074b8570a79a4483 /src/nxt_h1proto.c | |
parent | 4c4981f992f8b6252e1547f80d55904078cec992 (diff) | |
download | unit-30a83a115974b1898e666eefe206597b897c06b4.tar.gz unit-30a83a115974b1898e666eefe206597b897c06b4.tar.bz2 |
Using correct pointer and size for memzero operation.
Found by Coverity (CID 215689).
Diffstat (limited to 'src/nxt_h1proto.c')
-rw-r--r-- | src/nxt_h1proto.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c index 4203d62f..12be4172 100644 --- a/src/nxt_h1proto.c +++ b/src/nxt_h1proto.c @@ -862,9 +862,8 @@ nxt_h1p_keepalive(nxt_task_t *task, nxt_h1proto_t *h1p, nxt_conn_t *c) b = h1p->buffers; - nxt_memzero(&h1p->parser, sizeof(nxt_h1proto_t)); + nxt_memzero(h1p, offsetof(nxt_h1proto_t, conn)); - h1p->conn = c; in = c->read; size = nxt_buf_mem_used_size(&in->mem); |