[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.3.1] Fix memory leak in test_channelpadding_consensus().



commit 8550016e6f5e2780259f5073e34e67708e4e87ff
Author: Alexander Færøy <ahf@xxxxxxxxxxxxxx>
Date:   Sat Jun 23 12:52:04 2018 +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
---
 src/test/test_channelpadding.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/test/test_channelpadding.c b/src/test/test_channelpadding.c
index d54c9cc52..0bc9699fe 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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits