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).
This commit is contained in:
Max Romanov
2021-12-01 18:05:16 +03:00
parent 8c9228d19f
commit 8fb9f7f049

View File

@@ -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