Browse Source

Fix crash when looking for ~/.torrc with no $HOME set

svn:r2256
Nick Mathewson 21 years ago
parent
commit
4e026f5b1d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/or/config.c

+ 1 - 1
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);