From 4e026f5b1d4c00c8c85528f8ac0cfa7c2234cd04 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 17 Aug 2004 07:33:06 +0000 Subject: Fix crash when looking for ~/.torrc with no $HOME set svn:r2256 --- src/or/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/or/config.c b/src/or/config.c index de529aafc..3d1c89e2b 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -669,7 +669,7 @@ int getconfig(int argc, char **argv, or_options_t *options) { using_default_torrc = 1; } else { char *fn = expand_filename("~/.torrc"); - if (file_status(fn)==FN_FILE) { + if (fn && file_status(fn)==FN_FILE) { fname = fn; } else { tor_free(fn); -- cgit v1.2.3