aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_extorport.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-26 14:48:30 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-29 12:48:02 -0400
commitaa0eb2022342798fc78b2bde89d393f37c59fe78 (patch)
tree559c4913bd41265a2cbe3b07b031c90c19fabeb5 /src/test/test_extorport.c
parentee9ed9d817ebfb9101030ed0f899871ba8113b74 (diff)
downloadtor-aa0eb2022342798fc78b2bde89d393f37c59fe78.tar
tor-aa0eb2022342798fc78b2bde89d393f37c59fe78.tar.gz
Fix leaks in tests related to setting options->DataDirectory
We pre-populate that value in main(), and we weren't freeing it before overriding it.
Diffstat (limited to 'src/test/test_extorport.c')
-rw-r--r--src/test/test_extorport.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test_extorport.c b/src/test/test_extorport.c
index f91ac7415..d47792fdb 100644
--- a/src/test/test_extorport.c
+++ b/src/test/test_extorport.c
@@ -172,6 +172,7 @@ test_ext_or_init_auth(void *arg)
(void)arg;
/* Check default filename location */
+ tor_free(options->DataDirectory);
options->DataDirectory = tor_strdup("foo");
cp = get_ext_or_auth_cookie_file_name();
tt_str_op(cp, ==, "foo"PATH_SEPARATOR"extended_orport_auth_cookie");