]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix crash when looking for ~/.torrc with no $HOME set
authorNick Mathewson <nickm@torproject.org>
Tue, 17 Aug 2004 07:33:06 +0000 (07:33 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 17 Aug 2004 07:33:06 +0000 (07:33 +0000)
svn:r2256

src/or/config.c

index de529aafc47309671de21068e6619ed2a764e107..3d1c89e2be0026bedf2523276c24f866a6d12f52 100644 (file)
@@ -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);