diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-11 06:17:59 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-11 06:17:59 +0000 |
commit | 6ffb4d4ab6cd62b047ecc2f4a3118f6f1d098a20 (patch) | |
tree | 0eb9f7fcd3fe2c078e8d073a36ac29861b3d787b /src/or | |
parent | 3be88b2c7090ecccd5db8370b652c41400bd5c30 (diff) | |
download | tor-6ffb4d4ab6cd62b047ecc2f4a3118f6f1d098a20.tar.gz tor-6ffb4d4ab6cd62b047ecc2f4a3118f6f1d098a20.zip |
Fix memory leaks in test_dir_format
svn:r17578
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/test.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/or/test.c b/src/or/test.c index 4cddff44a5..e5446d0872 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -2874,17 +2874,6 @@ test_dir_format(void) #endif dirserv_free_fingerprint_list(); - tor_free(pk1_str); - tor_free(pk2_str); - tor_free(pk3_str); - if (pk1) crypto_free_pk_env(pk1); - if (pk2) crypto_free_pk_env(pk2); - if (pk3) crypto_free_pk_env(pk3); - if (rp1) routerinfo_free(rp1); - if (rp2) routerinfo_free(rp2); - tor_free(dir1); /* XXXX And more !*/ - tor_free(dir2); /* And more !*/ - /* Try out version parsing functionality */ test_eq(0, tor_version_parse("0.3.4pre2-cvs", &ver1)); test_eq(0, ver1.major); @@ -2983,6 +2972,17 @@ test_dir_format(void) routerinfo_free(r1); if (r2) routerinfo_free(r2); + + tor_free(pk1_str); + tor_free(pk2_str); + tor_free(pk3_str); + if (pk1) crypto_free_pk_env(pk1); + if (pk2) crypto_free_pk_env(pk2); + if (pk3) crypto_free_pk_env(pk3); + if (rp1) routerinfo_free(rp1); + if (rp2) routerinfo_free(rp2); + tor_free(dir1); /* XXXX And more !*/ + tor_free(dir2); /* And more !*/ } extern const char AUTHORITY_CERT_1[]; |