diff options
author | Max Romanov <max.romanov@nginx.com> | 2021-12-01 18:05:16 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2021-12-01 18:05:16 +0300 |
commit | 8fb9f7f049474e4d9c80c0b25ad152bb937c2f86 (patch) | |
tree | acb2b5d8c31583e4839f1405c66718d034a598b2 | |
parent | 8c9228d19f76f3668bf00725413960d5e7cc6173 (diff) | |
download | unit-8fb9f7f049474e4d9c80c0b25ad152bb937c2f86.tar.gz unit-8fb9f7f049474e4d9c80c0b25ad152bb937c2f86.tar.bz2 |
Fixing uninitialized structure field.
Port's "data" field may be used by application and thus need to be set to NULL.
The issue was introduced in the f8a0992944df commit.
Found by Coverity (CID 374352).
-rw-r--r-- | src/nxt_unit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nxt_unit.c b/src/nxt_unit.c index 57b89617..dac612b8 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -442,6 +442,7 @@ nxt_unit_init(nxt_unit_init_t *init) queue_fd = -1; mem = MAP_FAILED; shared_port.out_fd = -1; + shared_port.data = NULL; if (init->ready_port.id.pid != 0 && init->ready_stream != 0 |