Parcourir la 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 il y a 8 ans
Parent
commit
45681f695c
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  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"