Tor's tor_run_main function has returned and a call to terminateAndAwaitResult is needed to clean up resources.
tor_run_main