;
}
-#define sl_is_conn_assert(sl, conn) \
- do { \
- tt_assert(smartlist_len((sl)) == 1); \
- tt_assert(smartlist_get((sl), 0) == (conn)); \
+#define sl_is_conn_assert(sl_input, conn) \
+ do { \
+ the_sl = (sl_input); \
+ tt_assert(smartlist_len((the_sl)) == 1); \
+ tt_assert(smartlist_get((the_sl), 0) == (conn)); \
+ smartlist_free(the_sl); the_sl = NULL; \
} while (0)
-#define sl_no_conn_assert(sl) \
- do { \
- tt_assert(smartlist_len((sl)) == 0); \
+#define sl_no_conn_assert(sl_input) \
+ do { \
+ the_sl = (sl_input); \
+ tt_assert(smartlist_len((the_sl)) == 0); \
+ smartlist_free(the_sl); the_sl = NULL; \
} while (0)
static void
test_conn_get_rsrc(void *arg)
{
dir_connection_t *conn = DOWNCAST(dir_connection_t, arg);
+ smartlist_t *the_sl = NULL;
tt_assert(conn);
assert_connection_ok(&conn->base_, time(NULL));
== 0);
done:
- ;
+ smartlist_free(the_sl);
}
static void
tor_free(TO_CONN(exitconn)->address);
tor_free(cache_entry->pending_connections);
tor_free(cache_entry);
+ tor_free(exitconn);
return;
}
tor_free(TO_CONN(exitconn)->address);
tor_free(cache_entry->pending_connections);
tor_free(cache_entry);
+ tor_free(exitconn);
return;
}
tt_want(tls);
tor_tls_free(tls); tls = NULL;
+ SSL_CTX_free(client_tls_context->ctx);
client_tls_context->ctx = NULL;
tls = tor_tls_new(-1, 0);
tt_assert(!tls);
tor_free(tls->ssl->session);
tor_free(tls->ssl);
tor_free(tls);
+ X509_free(validCert);
}
#endif
tt_assert(id_cert);
done:
+ sk_X509_free(sess->cert_chain);
tor_free(sess);
tor_free(tls->ssl->session);
tor_free(tls->ssl);
done:
teardown_capture_of_logs(previous_log);
+ BIO_free(tls->ssl->rbio);
tor_free(tls->ssl);
tor_free(tls);
tor_free(method);