summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-12 08:40:13 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-12 08:40:13 -0400
commit5bb4e0c88d3fc94459eec73e15b1ce8205768fbd (patch)
tree1c2c443693013b06d226912c15b1ad175ef8efd6 /src
parent6e4967ef03fb5d046592253c41e2a62f822332fd (diff)
downloadtor-5bb4e0c88d3fc94459eec73e15b1ce8205768fbd.tar.gz
tor-5bb4e0c88d3fc94459eec73e15b1ce8205768fbd.zip
Whoops -- options_trial_assign() was calling get_options() in #22281
So, move the get_options() call.
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index aebca907f2..9d6cc9a26b 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2313,17 +2313,18 @@ options_trial_assign(config_line_t *list, unsigned flags, char **msg)
}
setopt_err_t rv;
+ or_options_t *cur_options = get_options_mutable();
in_option_validation = 1;
- if (options_validate(get_options_mutable(), trial_options,
+ if (options_validate(cur_options, trial_options,
global_default_options, 1, msg) < 0) {
or_options_free(trial_options);
rv = SETOPT_ERR_PARSE; /*XXX make this a separate return value. */
goto done;
}
- if (options_transition_allowed(get_options(), trial_options, msg) < 0) {
+ if (options_transition_allowed(cur_options, trial_options, msg) < 0) {
or_options_free(trial_options);
rv = SETOPT_ERR_TRANSITION;
goto done;