Browse Source

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).
Steven Chamberlain 8 years ago
parent
commit
45681f695c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/test/test_options.c

+ 1 - 0
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"