diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-29 13:07:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-29 13:07:13 -0400 |
commit | d3ecb3a8d6d55575d4ab3f80fed5e2b2fdcc561a (patch) | |
tree | e6aff7c3efea37955c7bd7555aa4a5f5ac53de70 /src/test/test_hs_intropoint.c | |
parent | f6b30a97a96837e012b296a43cc99018d96bcf13 (diff) | |
parent | 92b4996b233a6a5d034b4ecc47b9f97985bb5886 (diff) | |
download | tor-d3ecb3a8d6d55575d4ab3f80fed5e2b2fdcc561a.tar.gz tor-d3ecb3a8d6d55575d4ab3f80fed5e2b2fdcc561a.zip |
Merge branch 'maint-0.3.3' into maint-0.3.4
Diffstat (limited to 'src/test/test_hs_intropoint.c')
-rw-r--r-- | src/test/test_hs_intropoint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c index 4253c9a388..1671fa9e7a 100644 --- a/src/test/test_hs_intropoint.c +++ b/src/test/test_hs_intropoint.c @@ -42,6 +42,10 @@ new_establish_intro_cell(const char *circ_nonce, trn_cell_establish_intro_t *cell = NULL; hs_service_intro_point_t *ip = NULL; + /* Ensure that *cell_out is NULL such that we can use to check if we need to + * free `cell` in case of an error. */ + *cell_out = NULL; + /* Auth key pair is generated in the constructor so we are all set for * using this IP object. */ ip = service_intro_point_new(NULL, 0); @@ -55,6 +59,9 @@ new_establish_intro_cell(const char *circ_nonce, *cell_out = cell; done: + if (*cell_out == NULL) + trn_cell_establish_intro_free(cell); + service_intro_point_free(ip); return cell_len; } |