aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2018-06-23 12:52:04 +0200
committerAlexander Færøy <ahf@torproject.org>2018-06-23 12:52:04 +0200
commit8550016e6f5e2780259f5073e34e67708e4e87ff (patch)
tree33cceb04519410c0171fddbce985b8eaa862af22
parentd86c45bf5cc75a526b884a754d72ef4d11aa0693 (diff)
downloadtor-8550016e6f5e2780259f5073e34e67708e4e87ff.tar.gz
tor-8550016e6f5e2780259f5073e34e67708e4e87ff.zip
Fix memory leak in test_channelpadding_consensus().
The relay variable is always allocated, but might not be freed before we return from this function. See: Coverity CID 1437431
-rw-r--r--src/test/test_channelpadding.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_channelpadding.c b/src/test/test_channelpadding.c
index d54c9cc52c..0bc9699feb 100644
--- a/src/test/test_channelpadding.c
+++ b/src/test/test_channelpadding.c
@@ -745,6 +745,8 @@ test_channelpadding_consensus(void *arg)
tt_i64_op(val, OP_LE, 24*60*60*2);
done:
+ tor_free(relay);
+
free_mock_consensus();
free_fake_channeltls((channel_tls_t*)chan);
smartlist_free(connection_array);