summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_unit.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2021-12-01 18:05:16 +0300
committerMax Romanov <max.romanov@nginx.com>2021-12-01 18:05:16 +0300
commit8fb9f7f049474e4d9c80c0b25ad152bb937c2f86 (patch)
treeacb2b5d8c31583e4839f1405c66718d034a598b2 /src/nxt_unit.c
parent8c9228d19f76f3668bf00725413960d5e7cc6173 (diff)
downloadunit-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).
Diffstat (limited to 'src/nxt_unit.c')
-rw-r--r--src/nxt_unit.c1
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