mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix memory leaks in test_dir_format
svn:r17578
This commit is contained in:
parent
3be88b2c70
commit
6ffb4d4ab6
@ -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[];
|
||||
|
Loading…
Reference in New Issue
Block a user