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

svn:r2256
This commit is contained in:
Nick Mathewson 2004-08-17 07:33:06 +00:00
parent 9bcd4a9c6a
commit 4e026f5b1d

View 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);