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

[tor-commits] [tor/master] Fix small memory leak in config include tests



commit 3c70f26dc07cea98e009dc8b15009ca8e72ba226
Author: Daniel Pinto <danielpinto52@xxxxxxxxx>
Date:   Wed Jun 3 22:09:54 2020 +0100

    Fix small memory leak in config include tests
    
    Tests that used options_init_from_string were not freeing calling
    config_free_all().
---
 src/test/test_config.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/test/test_config.c b/src/test/test_config.c
index 617a52b8ac..cb88b95761 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -5875,6 +5875,7 @@ test_config_include_flag_both_without(void *data)
 
  done:
   tor_free(errmsg);
+  config_free_all();
 }
 
 static void
@@ -5915,6 +5916,7 @@ test_config_include_flag_torrc_only(void *data)
   tor_free(errmsg);
   tor_free(path);
   tor_free(dir);
+  config_free_all();
 }
 
 static void
@@ -5955,6 +5957,7 @@ test_config_include_flag_defaults_only(void *data)
   tor_free(errmsg);
   tor_free(path);
   tor_free(dir);
+  config_free_all();
 }
 
 static void



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