summaryrefslogtreecommitdiff
path: root/src/app/main/shutdown.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-02-18 12:55:57 -0500
committerNick Mathewson <nickm@torproject.org>2020-02-18 12:55:57 -0500
commiteb07166eb8aed3a37fe0e5ade476d7084bc0c5e4 (patch)
tree938cfc3f32af76c0e88553826568ce0d91ea3829 /src/app/main/shutdown.c
parent17724a7cdeb9b98539831f1164a82784f1fb050f (diff)
downloadtor-eb07166eb8aed3a37fe0e5ade476d7084bc0c5e4.tar.gz
tor-eb07166eb8aed3a37fe0e5ade476d7084bc0c5e4.zip
Make sure callers can handle NULL ext-or auth cookie filename
Diffstat (limited to 'src/app/main/shutdown.c')
-rw-r--r--src/app/main/shutdown.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app/main/shutdown.c b/src/app/main/shutdown.c
index 27d92609eb..aac15246b9 100644
--- a/src/app/main/shutdown.c
+++ b/src/app/main/shutdown.c
@@ -75,7 +75,8 @@ tor_cleanup(void)
/* Remove Extended ORPort cookie authentication file */
{
char *cookie_fname = get_ext_or_auth_cookie_file_name();
- tor_remove_file(cookie_fname);
+ if (cookie_fname)
+ tor_remove_file(cookie_fname);
tor_free(cookie_fname);
}
if (accounting_is_enabled(options))