diff --git a/CHANGELOG b/CHANGELOG index 40d107e8c..e314d6ac4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +2018-08-27 + + - 1.12.4 + - Fix memory leak when engine is destroyed + - Fix memory leak in http_client + - Fix gcc warning in unit tests + 2018-08-22 - 1.12.3 diff --git a/include/lsquic.h b/include/lsquic.h index f028334fc..adfc33c2f 100644 --- a/include/lsquic.h +++ b/include/lsquic.h @@ -25,7 +25,7 @@ extern "C" { #define LSQUIC_MAJOR_VERSION 1 #define LSQUIC_MINOR_VERSION 12 -#define LSQUIC_PATCH_VERSION 3 +#define LSQUIC_PATCH_VERSION 4 /** * Engine flags: diff --git a/src/liblsquic/lsquic_engine.c b/src/liblsquic/lsquic_engine.c index 47fc08dcf..7cc5a366f 100644 --- a/src/liblsquic/lsquic_engine.c +++ b/src/liblsquic/lsquic_engine.c @@ -574,6 +574,7 @@ lsquic_engine_destroy (lsquic_engine_t *engine) assert(0 == lsquic_mh_count(&engine->conns_out)); assert(0 == lsquic_mh_count(&engine->conns_tickable)); + lsquic_mm_cleanup(&engine->pub.enp_mm); free(engine->conns_tickable.mh_elems); free(engine); } diff --git a/test/http_client.c b/test/http_client.c index a4b08291e..e7fce9992 100644 --- a/test/http_client.c +++ b/test/http_client.c @@ -306,6 +306,7 @@ display_cert_chain (lsquic_conn_t *conn) name = X509_get_subject_name(cert); LSQ_INFO("cert #%u: name: %s", i, X509_NAME_oneline(name, buf, sizeof(buf))); + X509_free(cert); } sk_X509_free(chain); @@ -712,5 +713,11 @@ main (int argc, char **argv) if (promise_fd >= 0) (void) close(promise_fd); + while ((pe = TAILQ_FIRST(&client_ctx.hcc_path_elems))) + { + TAILQ_REMOVE(&client_ctx.hcc_path_elems, pe, next_pe); + free(pe); + } + exit(0 == s ? EXIT_SUCCESS : EXIT_FAILURE); } diff --git a/test/unittests/test_di_nocopy.c b/test/unittests/test_di_nocopy.c index 3a79f6c58..95e52abaa 100644 --- a/test/unittests/test_di_nocopy.c +++ b/test/unittests/test_di_nocopy.c @@ -281,8 +281,8 @@ run_di_nocopy_test (const struct nocopy_test *test) { data_frame = di->di_if->di_get_frame(di, nread); assert(data_frame); /* Self-check */ - n_to_read = test->read_until - nread > data_frame->df_size - data_frame->df_read_off - ? data_frame->df_size - data_frame->df_read_off : test->read_until - nread; + n_to_read = test->read_until - nread > (unsigned) data_frame->df_size - data_frame->df_read_off + ? (unsigned) data_frame->df_size - data_frame->df_read_off : test->read_until - nread; data_frame->df_read_off += n_to_read; nread += n_to_read; if (data_frame->df_read_off == data_frame->df_size)