From 75f54c8c52927f030ac337cfb510bbf854638f5f Mon Sep 17 00:00:00 2001 From: Dmitri Tikhonov Date: Fri, 25 Sep 2020 10:03:43 -0400 Subject: [PATCH] Release 2.12.9 - [BUGFIX] Memory leak in IETF full conn dtor: cleanup closed IDs sets. - [BUGFIX] Memory leak: free pushed promise when refcnt is zero. --- CHANGELOG | 5 +++++ docs/conf.py | 2 +- include/lsquic.h | 2 +- src/liblsquic/lsquic_full_conn_ietf.c | 2 ++ src/liblsquic/lsquic_push_promise.h | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 42f4691..6c47e31 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +2020-09-25 + - 2.12.9 + - [BUGFIX] Memory leak in IETF full conn dtor: cleanup closed IDs sets. + - [BUGFIX] Memory leak: free pushed promise when refcnt is zero. + 2020-09-08 - 2.12.8 - [BUGFIX] when stream is reset, it is writeable -- let user collect the diff --git a/docs/conf.py b/docs/conf.py index f02e81c..c7122d3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ author = u'LiteSpeed Technologies' # The short X.Y version version = u'2.12' # The full version, including alpha/beta/rc tags -release = u'2.12.8' +release = u'2.12.9' # -- General configuration --------------------------------------------------- diff --git a/include/lsquic.h b/include/lsquic.h index 278a153..7d710df 100644 --- a/include/lsquic.h +++ b/include/lsquic.h @@ -25,7 +25,7 @@ extern "C" { #define LSQUIC_MAJOR_VERSION 2 #define LSQUIC_MINOR_VERSION 12 -#define LSQUIC_PATCH_VERSION 8 +#define LSQUIC_PATCH_VERSION 9 /** * Engine flags: diff --git a/src/liblsquic/lsquic_full_conn_ietf.c b/src/liblsquic/lsquic_full_conn_ietf.c index a618b89..af38fc4 100644 --- a/src/liblsquic/lsquic_full_conn_ietf.c +++ b/src/liblsquic/lsquic_full_conn_ietf.c @@ -2692,6 +2692,8 @@ ietf_full_conn_ci_destroy (struct lsquic_conn *lconn) if (conn->ifc_pub.u.ietf.promises) lsquic_hash_destroy(conn->ifc_pub.u.ietf.promises); } + for (i = 0; i < N_SITS; ++i) + lsquic_set64_cleanup(&conn->ifc_closed_stream_ids[i]); lsquic_hash_destroy(conn->ifc_pub.all_streams); EV_LOG_CONN_EVENT(LSQUIC_LOG_CONN_ID, "full connection destroyed"); free(conn->ifc_errmsg); diff --git a/src/liblsquic/lsquic_push_promise.h b/src/liblsquic/lsquic_push_promise.h index fff12c2..ca1b85a 100644 --- a/src/liblsquic/lsquic_push_promise.h +++ b/src/liblsquic/lsquic_push_promise.h @@ -62,7 +62,7 @@ struct push_promise LSQ_DEBUG("destroy push promise %"PRIu64, (promise_)->pp_id); \ if ((promise_)->pp_hash_id.qhe_flags & QHE_HASHED) \ lsquic_hash_erase(all_promises_, &(promise_)->pp_hash_id); \ - free(promise); \ + free(promise_); \ } \ } \ else \