commit 8550016e6f5e2780259f5073e34e67708e4e87ff
parent d86c45bf5cc75a526b884a754d72ef4d11aa0693
Author: Alexander Færøy <ahf@torproject.org>
Date: Sat, 23 Jun 2018 12:52:04 +0200
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
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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);