]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only terminate PT processes that are running.
authorAlexander Færøy <ahf@torproject.org>
Fri, 24 Sep 2021 14:07:21 +0000 (16:07 +0200)
committerDavid Goulet <dgoulet@torproject.org>
Thu, 25 May 2023 14:50:11 +0000 (10:50 -0400)
See: tpo/core/tor#33669

src/feature/client/transports.c

index e8f0ed543f82e154c9c2fbd4c8189d96a399504f..95c9cfeba2beac7c395e88afe552adc1903f5974 100644 (file)
@@ -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. */