浏览代码

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 年之前
父节点
当前提交
45681f695c
共有 1 个文件被更改,包括 1 次插入0 次删除
  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"