[tor-commits] [tor/master] test_options.c: NULL a pointer after free #18447

nickm at torproject.org nickm at torproject.org
Sat Mar 19 14:13:29 UTC 2016


commit 45681f695c6096e280bc7ec3bf0a67c27708dbbc
Author: Steven Chamberlain <steven at pyro.eu.org>
Date:   Mon Feb 29 14:09:07 2016 +0000

    test_options.c: NULL a pointer after free #18447
    
    tdata will be double-freed if none of linux, __FreeBSD__, DARWIN or
    __OpenBSD__ are defined.  (For example, FreeBSD derivatives).
---
 src/test/test_options.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/test_options.c b/src/test/test_options.c
index d294e60..9ea5718 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -1078,6 +1078,7 @@ test_options_validate__transproxy(void *ignored)
 
   // Test trans proxy success
   free_options_test_data(tdata);
+  tdata = NULL;
 
 #if defined(linux)
   tdata = get_options_test_data("TransProxyType tproxy\n"



More information about the tor-commits mailing list