diff options
author | David Goulet <dgoulet@torproject.org> | 2020-04-01 08:22:36 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-04-01 08:22:36 -0400 |
commit | b5412d12f9eb4ef7ad5265ac441cd63b3f100ef3 (patch) | |
tree | d3180a86bf937011a95986c6ff53fc3fbae4f1ef /src/feature/hs/hs_service.c | |
parent | ca8e6451f2be09415eb6ebf66f22272b13d02246 (diff) | |
parent | 8fda94f944f00f6f436604038ce135ab70f4feb4 (diff) | |
download | tor-b5412d12f9eb4ef7ad5265ac441cd63b3f100ef3.tar.gz tor-b5412d12f9eb4ef7ad5265ac441cd63b3f100ef3.zip |
Merge branch 'tor-github/pr/1844'
Diffstat (limited to 'src/feature/hs/hs_service.c')
-rw-r--r-- | src/feature/hs/hs_service.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c index 0a5cb4277c..53e33f80ea 100644 --- a/src/feature/hs/hs_service.c +++ b/src/feature/hs/hs_service.c @@ -890,10 +890,18 @@ move_hs_state(hs_service_t *src_service, hs_service_t *dst_service) if (dst->replay_cache_rend_cookie != NULL) { replaycache_free(dst->replay_cache_rend_cookie); } + dst->replay_cache_rend_cookie = src->replay_cache_rend_cookie; + src->replay_cache_rend_cookie = NULL; /* steal pointer reference */ + dst->next_rotation_time = src->next_rotation_time; - src->replay_cache_rend_cookie = NULL; /* steal pointer reference */ + if (src->ob_subcreds) { + dst->ob_subcreds = src->ob_subcreds; + dst->n_ob_subcreds = src->n_ob_subcreds; + + src->ob_subcreds = NULL; /* steal pointer reference */ + } } /** Register services that are in the staging list. Once this function returns, @@ -4154,8 +4162,8 @@ hs_service_free_(hs_service_t *service) } /* Free onionbalance subcredentials (if any) */ - if (service->ob_subcreds) { - tor_free(service->ob_subcreds); + if (service->state.ob_subcreds) { + tor_free(service->state.ob_subcreds); } /* Wipe service keys. */ |