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

nickm at torproject.org nickm at torproject.org
Wed Aug 12 18:42:39 UTC 2020


commit 3c70f26dc07cea98e009dc8b15009ca8e72ba226
Author: Daniel Pinto <danielpinto52 at gmail.com>
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





More information about the tor-commits mailing list