diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-07-23 10:13:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-07-24 15:21:56 -0400 |
commit | 57e87cc86cce0b9fb351b1862f99c84bfa8100eb (patch) | |
tree | 38b5ba153f209fe127ad61a95cf30c9adf4443fa /src/app/config/statefile.c | |
parent | a1b2817abefc5c696e469fa4fd8a09cc5f286aa6 (diff) | |
download | tor-57e87cc86cce0b9fb351b1862f99c84bfa8100eb.tar.gz tor-57e87cc86cce0b9fb351b1862f99c84bfa8100eb.zip |
Use config_new() to construct configuration objects.
We'll need to do it this way once the objects become more complex.
Diffstat (limited to 'src/app/config/statefile.c')
-rw-r--r-- | src/app/config/statefile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/app/config/statefile.c b/src/app/config/statefile.c index 93e35659df..54ee398a7f 100644 --- a/src/app/config/statefile.c +++ b/src/app/config/statefile.c @@ -376,8 +376,7 @@ or_state_save_broken(char *fname) STATIC or_state_t * or_state_new(void) { - or_state_t *new_state = tor_malloc_zero(sizeof(or_state_t)); - new_state->magic_ = OR_STATE_MAGIC; + or_state_t *new_state = config_new(get_state_mgr()); config_init(get_state_mgr(), new_state); return new_state; |