diff options
author | Alexander Færøy <ahf@torproject.org> | 2021-09-24 16:07:21 +0200 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2023-05-25 10:50:11 -0400 |
commit | 3338b34ec9e57ffe57929f9cf67ae7f5e8f841be (patch) | |
tree | fd43f4d2baf8999028f35f23fa4bd717bea70571 | |
parent | 0d51dfa605a83fa2b97144de12c76c7ef79e15bb (diff) | |
download | tor-3338b34ec9e57ffe57929f9cf67ae7f5e8f841be.tar.gz tor-3338b34ec9e57ffe57929f9cf67ae7f5e8f841be.zip |
Only terminate PT processes that are running.
See: tpo/core/tor#33669
-rw-r--r-- | src/feature/client/transports.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c index e8f0ed543f..95c9cfeba2 100644 --- a/src/feature/client/transports.c +++ b/src/feature/client/transports.c @@ -519,8 +519,10 @@ proxy_prepare_for_restart(managed_proxy_t *mp) tor_assert(mp->conf_state == PT_PROTO_COMPLETED); /* destroy the process handle and terminate the process. */ - process_set_data(mp->process, NULL); - process_terminate(mp->process); + if (mp->process) { + process_set_data(mp->process, NULL); + process_terminate(mp->process); + } /* destroy all its registered transports, since we will no longer use them. */ |