summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_application.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2021-12-01 18:05:50 +0300
committerMax Romanov <max.romanov@nginx.com>2021-12-01 18:05:50 +0300
commit97e61aad736da5fe1ad136a1d3055e16698f7d2b (patch)
treed314b2b917a6ea6b198c7dbd56a4042d339510dd /src/nxt_application.c
parentb8ea9d34fdff699006ecfdbd948f113686d2dc0c (diff)
downloadunit-97e61aad736da5fe1ad136a1d3055e16698f7d2b.tar.gz
unit-97e61aad736da5fe1ad136a1d3055e16698f7d2b.tar.bz2
Fixing prototype process crash.
A prototype stores linked application processes structures. When an application process terminates, it's removed from the list. To avoid double removal, the pointer to the next element should be set to NULL. The issue was introduced in c8790d2a89bb.
Diffstat (limited to '')
-rw-r--r--src/nxt_application.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nxt_application.c b/src/nxt_application.c
index 589821fb..82385ec4 100644
--- a/src/nxt_application.c
+++ b/src/nxt_application.c
@@ -1147,6 +1147,8 @@ nxt_proto_process_remove(nxt_task_t *task, nxt_pid_t pid)
process = lhq.value;
nxt_queue_remove(&process->link);
+ process->link.next = NULL;
+
break;
default: