]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
test_options.c: NULL a pointer after free #18447
authorSteven Chamberlain <steven@pyro.eu.org>
Mon, 29 Feb 2016 14:09:07 +0000 (14:09 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 17 Mar 2016 23:20:36 +0000 (19:20 -0400)
tdata will be double-freed if none of linux, __FreeBSD__, DARWIN or
__OpenBSD__ are defined.  (For example, FreeBSD derivatives).

src/test/test_options.c

index d294e607a24a6f777e5dbebe2e82893638b84cfa..9ea57189ef228896109f588edc6892bbded0b35a 100644 (file)
@@ -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"