diff --git a/src/or/config.c b/src/or/config.c index de529aafc4..3d1c89e2be 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);