diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-05 12:17:21 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-05 12:17:21 -0400 |
commit | e11cc95717736f5818745654f24a2ee5440057d2 (patch) | |
tree | 46cdae1078e1b0bb4cea6f739691085345abca7c /src/or/shared_random_state.c | |
parent | 87758dbebc7ab624ba7b8802478ae2dc980d90c0 (diff) | |
parent | 34bd333529a73d015561388159d7648b17fcdfa7 (diff) | |
download | tor-e11cc95717736f5818745654f24a2ee5440057d2.tar.gz tor-e11cc95717736f5818745654f24a2ee5440057d2.zip |
Merge remote-tracking branch 'asn/bug19555'
Diffstat (limited to 'src/or/shared_random_state.c')
-rw-r--r-- | src/or/shared_random_state.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/shared_random_state.c b/src/or/shared_random_state.c index 870b992837..52a0034db7 100644 --- a/src/or/shared_random_state.c +++ b/src/or/shared_random_state.c @@ -597,10 +597,16 @@ disk_state_put_srv_line(const sr_srv_t *srv, config_line_t *line) static void disk_state_reset(void) { + /* Free allocated memory */ config_free_lines(sr_disk_state->Commit); config_free_lines(sr_disk_state->SharedRandValues); config_free_lines(sr_disk_state->ExtraLines); + tor_free(sr_disk_state->TorVersion); + + /* Clean up the struct */ memset(sr_disk_state, 0, sizeof(*sr_disk_state)); + + /* Reset it with useful data */ sr_disk_state->magic_ = SR_DISK_STATE_MAGIC; sr_disk_state->TorVersion = tor_strdup(get_version()); } |