mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix crash when looking for ~/.torrc with no $HOME set
svn:r2256
This commit is contained in:
parent
9bcd4a9c6a
commit
4e026f5b1d
@ -669,7 +669,7 @@ int getconfig(int argc, char **argv, or_options_t *options) {
|
|||||||
using_default_torrc = 1;
|
using_default_torrc = 1;
|
||||||
} else {
|
} else {
|
||||||
char *fn = expand_filename("~/.torrc");
|
char *fn = expand_filename("~/.torrc");
|
||||||
if (file_status(fn)==FN_FILE) {
|
if (fn && file_status(fn)==FN_FILE) {
|
||||||
fname = fn;
|
fname = fn;
|
||||||
} else {
|
} else {
|
||||||
tor_free(fn);
|
tor_free(fn);
|
||||||
|
Loading…
Reference in New Issue
Block a user