From: Alexander Færøy Date: Sat, 23 Jun 2018 10:52:04 +0000 (+0200) Subject: Fix memory leak in test_channelpadding_consensus(). X-Git-Tag: tor-0.3.2.11~10^2^2~2^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8550016e6f5e2780259f5073e34e67708e4e87ff;p=thirdparty%2Ftor.git 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 --- 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);