diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-01-11 20:01:47 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-01-11 20:01:47 +0000 |
commit | fefa34d525ab5d62584b87e708f1538b25821171 (patch) | |
tree | ea5dbff28d1a6957cb05aaf444e2ce209cc13a23 | |
parent | adbe0f0adaf488461438e65e654dddfab8e9a777 (diff) | |
download | tor-fefa34d525ab5d62584b87e708f1538b25821171.tar.gz tor-fefa34d525ab5d62584b87e708f1538b25821171.zip |
Fix double-free of torrc_fname
svn:r5805
-rw-r--r-- | src/or/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 01e4041d10..7cd85c2a6a 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -2541,10 +2541,10 @@ options_init_from_torrc(int argc, char **argv) log(LOG_NOTICE, LD_CONFIG, "Configuration file \"%s\" not present, " "using reasonable defaults.", fname); tor_free(fname); /* sets fname to NULL */ + torrc_fname = NULL; } else { log(LOG_WARN, LD_CONFIG, "Unable to open configuration file \"%s\".", fname); - tor_free(fname); goto err; } } else { /* it opened successfully. use it. */ @@ -2578,6 +2578,7 @@ options_init_from_torrc(int argc, char **argv) return 0; err: tor_free(fname); + torrc_fname = NULL; config_free(&options_format, newoptions); return -1; } |