aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_client.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-15 16:40:11 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-15 16:40:11 -0400
commit76c33f7ff46df47df0cc880595c4d943d50f019b (patch)
tree11448ec9afd6990160ce6212c020d3c2630448d6 /src/test/test_hs_client.c
parentc1deabd3b0c9e2701696afc80ac8392f0efda2c7 (diff)
parenta28e239b171c1a69fd32b6583bca0559f7116445 (diff)
downloadtor-76c33f7ff46df47df0cc880595c4d943d50f019b.tar.gz
tor-76c33f7ff46df47df0cc880595c4d943d50f019b.zip
Merge branch 'scan-build-032'
Diffstat (limited to 'src/test/test_hs_client.c')
-rw-r--r--src/test/test_hs_client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index 16b2d604fd..38878d6ed5 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -218,7 +218,8 @@ test_e2e_rend_circuit_setup_legacy(void *arg)
done:
connection_free_(conn);
- tor_free(TO_CIRCUIT(or_circ)->n_chan);
+ if (or_circ)
+ tor_free(TO_CIRCUIT(or_circ)->n_chan);
circuit_free(TO_CIRCUIT(or_circ));
}
@@ -227,7 +228,7 @@ static void
test_e2e_rend_circuit_setup(void *arg)
{
uint8_t ntor_key_seed[DIGEST256_LEN] = {0};
- origin_circuit_t *or_circ;
+ origin_circuit_t *or_circ = NULL;
int retval;
connection_t *conn = NULL;
@@ -287,7 +288,8 @@ test_e2e_rend_circuit_setup(void *arg)
done:
connection_free_(conn);
- tor_free(TO_CIRCUIT(or_circ)->n_chan);
+ if (or_circ)
+ tor_free(TO_CIRCUIT(or_circ)->n_chan);
circuit_free(TO_CIRCUIT(or_circ));
}