diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-04 14:37:42 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-04 14:52:35 -0400 |
commit | 274efb126324f3f8a7e98b15a697c0038a9803d0 (patch) | |
tree | 06b7ab7f8442c1885b39bbb571d0d59b99a00b61 /src/test | |
parent | ad94d43fc50525e8814b6e99f78d4b9635fa80ca (diff) | |
download | tor-274efb126324f3f8a7e98b15a697c0038a9803d0.tar.gz tor-274efb126324f3f8a7e98b15a697c0038a9803d0.zip |
Use FREE_AND_NULL for impl types
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_tortls.c | 6 | ||||
-rw-r--r-- | src/test/test_x509.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c index b260310adb..8e8487a408 100644 --- a/src/test/test_tortls.c +++ b/src/test/test_tortls.c @@ -496,10 +496,8 @@ test_tortls_verify(void *ignored) done: UNMOCK(try_to_extract_certs_from_tls); - if (cert1) - tor_x509_cert_impl_free_(cert1); - if (cert2) - tor_x509_cert_impl_free_(cert2); + tor_x509_cert_impl_free(cert1); + tor_x509_cert_impl_free(cert2); tor_free(tls); crypto_pk_free(k); } diff --git a/src/test/test_x509.c b/src/test/test_x509.c index 9163977bd8..9ec0657d83 100644 --- a/src/test/test_x509.c +++ b/src/test/test_x509.c @@ -57,8 +57,7 @@ test_x509_cert_new_failing_digest(void *arg) done: crypto_pk_free(pk1); crypto_pk_free(pk2); - if (impl) - tor_x509_cert_impl_free_(impl); + tor_x509_cert_impl_free(impl); UNMOCK(crypto_digest); teardown_capture_of_logs(); } |