Explorar o código

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 %!s(int64=8) %!d(string=hai) anos
pai
achega
45681f695c
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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"